Contents
Class CreativeHubPlugin
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.builtin.creativehub.CreativeHubPlugin
- All Implemented Interfaces:
CommandOwner
Plugin for Creative Hub functionality.
Provides a hub-based creative mode where players spawn in a lobby instance and can use portals to access different permanent creative worlds.
-
Field Summary
Fields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearHubInstance(UUID parentWorldUuid) Clears the hub instance reference for the given parent world UUID.static CreativeHubPluginget()getActiveHubInstance(World parentWorld) Gets the active hub instance for the given parent world, if one exists.getOrSpawnHubInstance(World parentWorld, CreativeHubWorldConfig hubConfig, Transform returnPoint) Gets or spawns the shared hub instance for the given parent world.spawnPermanentWorldFromTemplate(String instanceAssetName, String permanentWorldName, Consumer<WorldConfig> configCustomizer) Creates or loads a permanent world from an instance asset template.Methods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Constructor Details
-
CreativeHubPlugin
-
-
Method Details
-
get
-
getOrSpawnHubInstance
@Nonnull public World getOrSpawnHubInstance(@Nonnull World parentWorld, @Nonnull CreativeHubWorldConfig hubConfig, @Nonnull Transform returnPoint) Gets or spawns the shared hub instance for the given parent world. If an instance already exists and is still valid, returns it. Otherwise, spawns a new instance.- Parameters:
parentWorld- The parent Creative Hub world.hubConfig- The hub configuration.returnPoint- The spawn point in the parent world.- Returns:
- The hub instance world.
-
getActiveHubInstance
-
clearHubInstance
Clears the hub instance reference for the given parent world UUID. Called when the hub instance is removed.- Parameters:
parentWorldUuid- The parent world UUID.
-
spawnPermanentWorldFromTemplate
@Nonnull public CompletableFuture<World> spawnPermanentWorldFromTemplate(@Nonnull String instanceAssetName, @Nonnull String permanentWorldName, @Nullable Consumer<WorldConfig> configCustomizer) Creates or loads a permanent world from an instance asset template.Unlike
InstancesPlugin.spawnInstance(String, World, Transform)which creates temporary instance copies, this creates a permanent world that persists across server restarts and retains all player modifications.If the world already exists, it will be loaded. Otherwise, the instance asset files will be copied to create a new permanent world.
- Parameters:
instanceAssetName- The name of the instance asset to use as template.permanentWorldName- The name for the permanent world.- Returns:
- A future that will resolve to the created/loaded world.
-
getCreativeHubEntityConfigComponentType
@Nonnull public ComponentType<EntityStore, CreativeHubEntityConfig> getCreativeHubEntityConfigComponentType()- Returns:
- the component type for
CreativeHubEntityConfig.
-