Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- init(PlayerRef, WindowManager)
- clearLegacyCustomPageAcknowledgements()
- getCustomPage()
- setPage(Ref, Store, Page)
- setPage(Ref, Store, Page, boolean)
- dev_setPage(Ref, Store, UIPage)
- closePage(Ref, Store)
- resetPages(PlayerRef)
- getActiveServersidePage()
- dev_handleServersidePageDismiss(Ref, Store, DismissServersidePage)
- dev_handleServersidePageCommand(Ref, Store, ExecuteServersidePageCommand)
- openCustomPage(Ref, Store, CustomUIPage)
- setPageWithWindows(Ref, Store, Page, boolean, Window...)
- openCustomPageWithWindows(Ref, Store, CustomUIPage, Window...)
- updateLegacyCustomPage(CustomPage)
- handleLegacyCustomPageEvent(Ref, Store, CustomPageEvent)
Class PageManager
java.lang.Object
com.hypixel.hytale.server.core.entity.entities.player.pages.PageManager
Handles the processing and setting of pages for a player.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled to clear the required custom page acknowledgements.voidclosePage(Ref<EntityStore> ref, Store<EntityStore> store) Closes any currently open page (custom or serverside) and returns the client to the default view.voiddev_handleServersidePageCommand(Ref<EntityStore> ref, Store<EntityStore> store, ExecuteServersidePageCommand packet) Routes an incoming execute-command packet from the client to the active serverside page.voiddev_handleServersidePageDismiss(Ref<EntityStore> ref, Store<EntityStore> store, DismissServersidePage packet) Called when the client closes a serverside page via the player close binding.voiddev_setPage(Ref<EntityStore> ref, Store<EntityStore> store, UIPage page) Sets a Noesis serverside page as the active page for this player.Part of an upcoming feature that is still in development and not yet ready for production use.voidhandleLegacyCustomPageEvent(Ref<EntityStore> ref, Store<EntityStore> store, CustomPageEvent event) Called to handle a custom page event for this page manager.voidinit(PlayerRef playerRef, WindowManager windowManager) Called to initialize this page manager, during the initialization of the player.voidopenCustomPage(Ref<EntityStore> ref, Store<EntityStore> store, CustomUIPage page) Called to open the provided custom UI page.booleanopenCustomPageWithWindows(Ref<EntityStore> ref, Store<EntityStore> store, CustomUIPage page, Window... windows) Called to set a specific custom UI page, associated with the provided windows.voidresetPages(PlayerRef playerRef) Tears down any open legacy or serverside page without sending packets.voidsetPage(Ref<EntityStore> ref, Store<EntityStore> store, Page page) Called to set the current active page.voidsetPage(Ref<EntityStore> ref, Store<EntityStore> store, Page page, boolean canCloseThroughInteraction) Called to set the current active page.booleansetPageWithWindows(Ref<EntityStore> ref, Store<EntityStore> store, Page page, boolean canCloseThroughInteraction, Window... windows) Called to set a specific page, associated with the provided windows.voidCalled to write the given page as a data packet to the associated client player.
-
Constructor Details
-
PageManager
public PageManager()
-
-
Method Details
-
init
Called to initialize this page manager, during the initialization of the player.- Parameters:
playerRef- The player ref associated with the affiliated player.windowManager- The affiliated window manager.
-
clearLegacyCustomPageAcknowledgements
public void clearLegacyCustomPageAcknowledgements()Called to clear the required custom page acknowledgements. -
getCustomPage
- Returns:
- the current custom UI page.
-
setPage
public void setPage(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull Page page) Called to set the current active page.- Parameters:
ref- The entity reference of the affiliated player entity.store- The entity store for component access.page- The page to set.
-
setPage
public void setPage(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull Page page, boolean canCloseThroughInteraction) Called to set the current active page.- Parameters:
ref- The entity reference of the affiliated player entity.store- The entity store for component access.page- The page to set.canCloseThroughInteraction- Whether the page can be closed via interaction.
-
dev_setPage
public void dev_setPage(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull UIPage page) Sets a Noesis serverside page as the active page for this player. Closes any currently open legacy custom page or serverside page first. The page lifetime controls whether and how the client can dismiss the page. Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.- Parameters:
ref- The entity reference of the affiliated player entity.store- The entity store for component access.page- The serverside page to set.
-
closePage
Closes any currently open page (custom or serverside) and returns the client to the default view.- Parameters:
ref- The entity reference of the affiliated player entity.store- The entity store for component access.
-
resetPages
Tears down any open legacy or serverside page without sending packets. Use on world change or player reset when the client UI is cleared separately.- Parameters:
playerRef- The player whose pages are being reset.
-
getActiveServersidePage
Part of an upcoming feature that is still in development and not yet ready for production use. Do not use.- Returns:
- the currently open Noesis serverside page, or
nullwhen none is open.
-
dev_handleServersidePageDismiss
public void dev_handleServersidePageDismiss(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull DismissServersidePage packet) Called when the client closes a serverside page via the player close binding. Runs teardown and lifecycle hooks without sending a redundantSetPagepacket back to the client. Do not call this method unless you know what you are doing.Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.
- Parameters:
ref- The entity reference of the affiliated player entity.store- The entity store for component access.packet- The packet received from the client.
-
dev_handleServersidePageCommand
public void dev_handleServersidePageCommand(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull ExecuteServersidePageCommand packet) Routes an incoming execute-command packet from the client to the active serverside page. Ignores the packet when no page is open or the packet id does not match the open page. Commands emitted by the handler are batched into one update packet. Do not call this method unless you know what you are doing.Part of an upcoming feature that is still in development and not yet ready for production use. Do not use. The API is not final and may change.
- Parameters:
ref- The entity reference of the affiliated player entity.store- The entity store for component access.packet- The packet received from the client.
-
openCustomPage
public void openCustomPage(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull CustomUIPage page) Called to open the provided custom UI page.- Parameters:
ref- The entity ref of the affiliated player.store- The entity store for component access.page- The custom UI page to open.
-
setPageWithWindows
public boolean setPageWithWindows(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull Page page, boolean canCloseThroughInteraction, @Nonnull Window... windows) Called to set a specific page, associated with the provided windows.- Parameters:
ref- The entity ref of the affiliated entity.store- The entity store for component access.page- The page to set.canCloseThroughInteraction- Whether the page can be closed via interaction.windows- The collection of windows associated with the page.- Returns:
trueif the page was set successfully,falseotherwise.
-
openCustomPageWithWindows
public boolean openCustomPageWithWindows(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull CustomUIPage page, @Nonnull Window... windows) Called to set a specific custom UI page, associated with the provided windows.- Parameters:
ref- The entity ref of the affiliated entity.store- The entity store for component access.page- The page to set.windows- The collection of windows associated with the page.- Returns:
trueif the page was set successfully,falseotherwise.
-
updateLegacyCustomPage
Called to write the given page as a data packet to the associated client player.- Parameters:
page- The page instance to send to the client player.
-
handleLegacyCustomPageEvent
public void handleLegacyCustomPageEvent(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull CustomPageEvent event) Called to handle a custom page event for this page manager.- Parameters:
ref- The reference to the affiliated entity.store- The entity store for component access.event- The event to handle.
-