Contents
Class RespawnPage
java.lang.Object
com.hypixel.hytale.server.core.entity.entities.player.pages.CustomUIPage
com.hypixel.hytale.server.core.entity.entities.player.pages.InteractiveCustomUIPage<RespawnPage.RespawnPageEventData>
com.hypixel.hytale.server.core.entity.entities.player.pages.RespawnPage
Respawn Page
An interactive custom UI specifically for the respawning of the player. Its note bar can show the personal hardcore lives the player has left. With a permadeath message it is instead the dismissable death screen for a player already converted to their death gamemode type: the note bar shows the message and the respawn button becomes a spectate button that just closes the page.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(Ref<EntityStore> ref, UICommandBuilder commandBuilder, UIEventBuilder eventBuilder, Store<EntityStore> store) Called to build this pagestatic RespawnPageforPermadeath(PlayerRef playerRef, Message deathReason, boolean displayDataOnDeathScreen, DeathItemLoss deathItemLoss, Message permadeathMessage) Creates the dismissable death screen for a player already converted to their death gamemode type: the note bar shows the message and the respawn button becomes a spectate button.static RespawnPageforRespawn(PlayerRef playerRef, Message deathReason, boolean displayDataOnDeathScreen, DeathItemLoss deathItemLoss, int livesRemaining) Creates the death screen for the normal respawn flow.voidhandleDataEvent(Ref<EntityStore> ref, Store<EntityStore> store, RespawnPage.RespawnPageEventData data) Called to handle a data event for this pagevoidonDismiss(Ref<EntityStore> ref, Store<EntityStore> store) Called when this page is dismissedMethods inherited from class InteractiveCustomUIPage
handleDataEventMethods inherited from class CustomUIPage
getLifetime, setLifetime
-
Method Details
-
forRespawn
@Nonnull public static RespawnPage forRespawn(@Nonnull PlayerRef playerRef, @Nullable Message deathReason, boolean displayDataOnDeathScreen, DeathItemLoss deathItemLoss, int livesRemaining) Creates the death screen for the normal respawn flow. A positivelivesRemainingshows the hardcore lives the player has left in the note bar.- Parameters:
playerRef- The player affiliated with the respawn pagedeathReason- The reason in which the player dieddisplayDataOnDeathScreen- Whether to display the data on the death screendeathItemLoss- The data related to the items lost on deathlivesRemaining- The hardcore lives the player has left, or0for no note
-
forPermadeath
@Nonnull public static RespawnPage forPermadeath(@Nonnull PlayerRef playerRef, @Nullable Message deathReason, boolean displayDataOnDeathScreen, DeathItemLoss deathItemLoss, @Nonnull Message permadeathMessage) Creates the dismissable death screen for a player already converted to their death gamemode type: the note bar shows the message and the respawn button becomes a spectate button.- Parameters:
playerRef- The player affiliated with the respawn pagedeathReason- The reason in which the player dieddisplayDataOnDeathScreen- Whether to display the data on the death screendeathItemLoss- The data related to the items lost on deathpermadeathMessage- The permadeath note
-
build
public void build(@Nonnull Ref<EntityStore> ref, @Nonnull UICommandBuilder commandBuilder, @Nonnull UIEventBuilder eventBuilder, @Nonnull Store<EntityStore> store) Description copied from class:CustomUIPageCalled to build this page- Specified by:
buildin classCustomUIPage- Parameters:
ref- The entity ref of the affiliated playercommandBuilder- The command builder used while building this UIeventBuilder- The event builder used while building this UIstore- The entity store for component access
-
handleDataEvent
public void handleDataEvent(@Nonnull Ref<EntityStore> ref, @Nonnull Store<EntityStore> store, @Nonnull RespawnPage.RespawnPageEventData data) Description copied from class:InteractiveCustomUIPageCalled to handle a data event for this page- Overrides:
handleDataEventin classInteractiveCustomUIPage<RespawnPage.RespawnPageEventData>- Parameters:
ref- The entity reference of the affiliated entitystore- The entity store for component accessdata- The data event to handle
-
onDismiss
Description copied from class:CustomUIPageCalled when this page is dismissed- Overrides:
onDismissin classCustomUIPage
-