Interface ServerWorldProperties.LoadOptions
- Enclosing interface:
ServerWorldProperties
ServerWorldProperties.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interfacestatic interface -
Method Summary
Modifier and TypeMethodDescriptionbuilder()create(WorldArchetype worldArchetype) Create a newServerWorldPropertieswith the givenWorldArchetypebut do not attempt to load it from disk or use the already loaded instance.create(WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Create a newServerWorldPropertieswith the givenWorldArchetypebut do not attempt to load it from disk or use the already loaded instance.Gets thecreation operationfor this option.get()Get the already loadedServerWorldPropertiesinstance but do not attempt load it from the disk or create it.get(Consumer<ServerWorldProperties> getCallback) Get the already loadedServerWorldPropertiesinstance but do not attempt load it from the disk or create it.getLoadOrCreate(Consumer<ServerWorldProperties> getCallback, Consumer<ServerWorldProperties> loadCallback, WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Get the already loadedServerWorldPropertiesor attempt to load it from disk.getLoadOrCreate(WorldArchetype worldArchetype) Get the already loadedServerWorldPropertiesor attempt to load it from disk.getLoadOrCreate(WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Get the already loadedServerWorldPropertiesor attempt to load it from disk.Gets theget operationfor this option.Get the already loadedServerWorldPropertiesor attempt to load it from disk but do not create a new one.getOrLoad(Consumer<ServerWorldProperties> getCallback, Consumer<ServerWorldProperties> loadCallback) Get the already loadedServerWorldPropertiesor attempt to load it from disk but do not create a new one.load()Load a newServerWorldPropertiesfrom disk but do not attempt to use the already loaded instance or to create a new one.load(Consumer<ServerWorldProperties> loadCallback) Load a newServerWorldPropertiesfrom disk but do not attempt to use the already loaded instance or to create a new one.Gets theload operationfor this option.loadOrCreate(Consumer<ServerWorldProperties> loadCallback, WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Load a newServerWorldPropertiesfrom disk or create a new one with the providedWorldArchetype.loadOrCreate(WorldArchetype worldArchetype) Load a newServerWorldPropertiesfrom disk or create a new one with the providedWorldArchetype.loadOrCreate(WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Load a newServerWorldPropertiesfrom disk or create a new one with the providedWorldArchetype.
-
Method Details
-
builder
-
load
Load a newServerWorldPropertiesfrom disk but do not attempt to use the already loaded instance or to create a new one.The operation fails if properties could not be loaded from disk.
- Returns:
- The load options.
-
load
Load a newServerWorldPropertiesfrom disk but do not attempt to use the already loaded instance or to create a new one.The operation fails if properties could not be loaded from disk.
- Parameters:
loadCallback- The consumer to call after successful load operation for additional configuration.- Returns:
- The load options.
-
get
Get the already loadedServerWorldPropertiesinstance but do not attempt load it from the disk or create it.The operation fails if properties were not already loaded.
- Returns:
- The load options.
-
get
Get the already loadedServerWorldPropertiesinstance but do not attempt load it from the disk or create it.The operation fails if properties were not already loaded.
- Parameters:
getCallback- The consumer to call after successful get operation for additional configuration.- Returns:
- The load options.
-
getOrLoad
Get the already loadedServerWorldPropertiesor attempt to load it from disk but do not create a new one.The operation fails if properties were not loaded nor could it be loaded from disk.
- Returns:
- The load options.
-
getOrLoad
static ServerWorldProperties.LoadOptions getOrLoad(Consumer<ServerWorldProperties> getCallback, Consumer<ServerWorldProperties> loadCallback) Get the already loadedServerWorldPropertiesor attempt to load it from disk but do not create a new one.The operation fails if properties were not loaded nor could it be loaded from disk.
- Parameters:
getCallback- The consumer to call after successful get operation for additional configuration.loadCallback- The consumer to call after successful load operation for additional configuration.- Returns:
- The load options.
-
loadOrCreate
Load a newServerWorldPropertiesfrom disk or create a new one with the providedWorldArchetype. Do not attempt to use the already loaded instance.This operation fails if properties were already loaded.
- Parameters:
worldArchetype- The archetype to use for creation.- Returns:
- The load options.
-
loadOrCreate
static ServerWorldProperties.LoadOptions loadOrCreate(WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Load a newServerWorldPropertiesfrom disk or create a new one with the providedWorldArchetype. Do not attempt to use the already loaded instance.This operation fails if properties were already loaded.
- Parameters:
worldArchetype- The archetype to use for creation.createCallback- The consumer to call after successful creation for additional configuration.- Returns:
- The load options.
-
loadOrCreate
static ServerWorldProperties.LoadOptions loadOrCreate(Consumer<ServerWorldProperties> loadCallback, WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Load a newServerWorldPropertiesfrom disk or create a new one with the providedWorldArchetype. Do not attempt to use the already loaded instance.This operation fails if properties were already loaded.
- Parameters:
loadCallback- The consumer to call after successful load operation for additional configuration.worldArchetype- The archetype to use for creation.createCallback- The consumer to call after successful creation for additional configuration.- Returns:
- The load options.
-
getLoadOrCreate
Get the already loadedServerWorldPropertiesor attempt to load it from disk. If not found, create a new one with the providedWorldArchetype.- Parameters:
worldArchetype- The archetype to use for creation.- Returns:
- The load options.
-
getLoadOrCreate
static ServerWorldProperties.LoadOptions getLoadOrCreate(WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Get the already loadedServerWorldPropertiesor attempt to load it from disk. If not found, create a new one with the providedWorldArchetype.- Parameters:
worldArchetype- The archetype to use for creation.createCallback- The consumer to call after successful creation for additional configuration.- Returns:
- The load options.
-
getLoadOrCreate
static ServerWorldProperties.LoadOptions getLoadOrCreate(Consumer<ServerWorldProperties> getCallback, Consumer<ServerWorldProperties> loadCallback, WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Get the already loadedServerWorldPropertiesor attempt to load it from disk. If not found, create a new one with the providedWorldArchetype.- Parameters:
getCallback- The consumer to call after successful get operation for additional configuration.loadCallback- The consumer to call after successful load operation for additional configuration.worldArchetype- The archetype to use for creation.createCallback- The consumer to call after successful creation for additional configuration.- Returns:
- The load options.
-
create
Create a newServerWorldPropertieswith the givenWorldArchetypebut do not attempt to load it from disk or use the already loaded instance.The operation fails if properties could not be created.
- Parameters:
worldArchetype- The archetype to use.- Returns:
- The load options.
-
create
static ServerWorldProperties.LoadOptions create(WorldArchetype worldArchetype, Consumer<ServerWorldProperties> createCallback) Create a newServerWorldPropertieswith the givenWorldArchetypebut do not attempt to load it from disk or use the already loaded instance.The operation fails if properties could not be created.
- Parameters:
worldArchetype- The archetype to use.createCallback- The consumer to call after successful creation for additional configuration.- Returns:
- The load options.
-
getOperation
Optional<ServerWorldProperties.LoadOptions.GetOperation> getOperation()Gets theget operationfor this option.If not present, the operation should fail on get.
- Returns:
- The option when found, if present.
-
loadOperation
Optional<ServerWorldProperties.LoadOptions.LoadOperation> loadOperation()Gets theload operationfor this option.If not present, the operation should fail on load.
- Returns:
- The option when found, if present.
-
createOperation
Optional<ServerWorldProperties.LoadOptions.CreateOperation> createOperation()Gets thecreation operationfor this option.If not present, the operation should fail on creation.
- Returns:
- The operation when created, if present.
-