Class CreativeHubEntityConfig

java.lang.Object
com.hypixel.hytale.builtin.creativehub.config.CreativeHubEntityConfig
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class CreativeHubEntityConfig extends Object implements Component<EntityStore>
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 Details

  • Constructor Details

    • CreativeHubEntityConfig

      public CreativeHubEntityConfig()
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, CreativeHubEntityConfig> getComponentType()
      Gets the component type for CreativeHubEntityConfig.
      Returns:
      the component type.
    • ensureAndGet

      @Nonnull public static CreativeHubEntityConfig ensureAndGet(@Nonnull Holder<EntityStore> holder)
      Ensures the component exists on the holder and returns it.
      Parameters:
      holder - The entity holder.
      Returns:
      the component instance.
    • get

      @Nullable public static CreativeHubEntityConfig get(@Nonnull Holder<EntityStore> holder)
      Gets the component from the holder if it exists.
      Parameters:
      holder - The entity holder.
      Returns:
      the component instance, or null if not present.
    • getParentHubWorldUuid

      @Nullable public UUID getParentHubWorldUuid()
      Returns:
      the UUID of the parent Creative Hub world, or null if not set.
    • setParentHubWorldUuid

      public void setParentHubWorldUuid(@Nullable UUID parentHubWorldUuid)
      Sets the parent Creative Hub world UUID.
      Parameters:
      parentHubWorldUuid - The UUID to set.
    • clone

      @Nonnull public CreativeHubEntityConfig clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.