java.lang.Object
com.hypixel.hytale.server.core.entity.entities.player.windows.Window
Direct Known Subclasses:
BlockWindow, ContainerWindow, FieldCraftingWindow, ItemStackContainerWindow, MemoriesWindow

public abstract class Window extends Object
  • Field Details

    • CLIENT_REQUESTABLE_WINDOW_TYPES

      public static final Map<WindowType,Supplier<? extends Window>> CLIENT_REQUESTABLE_WINDOW_TYPES
    • LOGGER

      @Nonnull protected static final com.hypixel.hytale.logger.HytaleLogger LOGGER
    • closeEventRegistry

      @Nonnull protected final com.hypixel.hytale.event.SyncEventBusRegistry<Void,Window.WindowCloseEvent> closeEventRegistry
    • windowType

      @Nonnull protected final WindowType windowType
    • isDirty

      @Nonnull protected final AtomicBoolean isDirty
    • needRebuild

      @Nonnull protected final AtomicBoolean needRebuild
    • id

      private int id
    • manager

      @Nullable private WindowManager manager
    • playerRef

      @Nullable private PlayerRef playerRef
  • Constructor Details

    • Window

      public Window(@Nonnull WindowType windowType)
  • Method Details

    • init

      public void init(@Nonnull PlayerRef playerRef, @Nonnull WindowManager manager)
    • getData

      @Nonnull public abstract com.google.gson.JsonObject getData()
    • onOpen0

      protected abstract boolean onOpen0()
    • onClose0

      protected abstract void onClose0()
    • onOpen

      protected boolean onOpen()
    • onClose

      protected void onClose()
    • handleAction

      public void handleAction(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull WindowAction action)
    • getType

      @Nonnull public WindowType getType()
    • setId

      public void setId(int id)
    • getId

      public int getId()
    • getPlayerRef

      @Nullable public PlayerRef getPlayerRef()
    • close

      public void close()
    • invalidate

      protected void invalidate()
    • setNeedRebuild

      protected void setNeedRebuild()
    • consumeIsDirty

      protected boolean consumeIsDirty()
    • consumeNeedRebuild

      protected void consumeNeedRebuild()
    • registerCloseEvent

      @Nonnull public EventRegistration registerCloseEvent(@Nonnull Consumer<Window.WindowCloseEvent> consumer)
    • registerCloseEvent

      @Nonnull public EventRegistration registerCloseEvent(short priority, @Nonnull Consumer<Window.WindowCloseEvent> consumer)
    • registerCloseEvent

      @Nonnull public EventRegistration registerCloseEvent(@Nonnull EventPriority priority, @Nonnull Consumer<Window.WindowCloseEvent> consumer)
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object