Contents
Class CreativeHubEntityConfig
java.lang.Object
com.hypixel.hytale.builtin.creativehub.config.CreativeHubEntityConfig
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
Entity component that tracks which Creative Hub world a player belongs to.
This is set once when the player first connects to a Creative Hub world
and remains unchanged regardless of how many portals the player goes through.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<CreativeHubEntityConfig> static final StringFields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static CreativeHubEntityConfigensureAndGet(Holder<EntityStore> holder) Ensures the component exists on the holder and returns it.static CreativeHubEntityConfigget(Holder<EntityStore> holder) Gets the component from the holder if it exists.Gets the component type forCreativeHubEntityConfig.voidsetParentHubWorldUuid(UUID parentHubWorldUuid) Sets the parent Creative Hub world UUID.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
ID
- See Also:
-
CODEC
-
-
Constructor Details
-
CreativeHubEntityConfig
public CreativeHubEntityConfig()
-
-
Method Details
-
getComponentType
Gets the component type forCreativeHubEntityConfig.- Returns:
- the component type.
-
ensureAndGet
Ensures the component exists on the holder and returns it.- Parameters:
holder- The entity holder.- Returns:
- the component instance.
-
get
Gets the component from the holder if it exists.- Parameters:
holder- The entity holder.- Returns:
- the component instance, or null if not present.
-
getParentHubWorldUuid
- Returns:
- the UUID of the parent Creative Hub world, or null if not set.
-
setParentHubWorldUuid
Sets the parent Creative Hub world UUID.- Parameters:
parentHubWorldUuid- The UUID to set.
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-