Contents
Class CustomUIHud
java.lang.Object
com.hypixel.hytale.server.core.entity.entities.player.hud.CustomUIHud
- Direct Known Subclasses:
SpectatingHud
Represents a custom UI hud for a specific player, allowing for the creation, display and
population of custom UI for a client
-
Constructor Summary
ConstructorsConstructorDescriptionCustomUIHud(PlayerRef playerRef, String key) Constructor for aCustomUIHudinstance with a specific key and z-order of 0.CustomUIHud(PlayerRef playerRef, String key, int zOrder) Constructor for aCustomUIHudinstance with a specific key and z-order. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()intvoidsetZOrder(int zOrder) Sets the z-order for this HUD layer and sends an update to the client so it can re-sort.voidshow()Called to show and update the custom UI to the playervoidupdate(boolean clear, UICommandBuilder commandBuilder) Called to send an update to the player with the latest contents of the provided command builder
-
Constructor Details
-
CustomUIHud
Constructor for aCustomUIHudinstance with a specific key and z-order of 0.- Parameters:
playerRef- ThePlayerRefinstance of the playerkey- The unique key identifying this HUD layer
-
CustomUIHud
Constructor for aCustomUIHudinstance with a specific key and z-order.- Parameters:
playerRef- ThePlayerRefinstance of the playerkey- The unique key identifying this HUD layerzOrder- The z-order for this HUD layer; higher values render on top
-
-
Method Details
-
show
public void show()Called to show and update the custom UI to the player -
update
Called to send an update to the player with the latest contents of the provided command builder- Parameters:
clear- Whether to clear the HUD completelycommandBuilder- TheUICommandBuilderthat contains the UI instructions for the client
-
getPlayerRef
-
getKey
- Returns:
- the unique key identifying this HUD layer
-
getZOrder
public int getZOrder()- Returns:
- the z-order for this HUD layer
-
setZOrder
public void setZOrder(int zOrder) Sets the z-order for this HUD layer and sends an update to the client so it can re-sort.- Parameters:
zOrder- The new z-order; higher values render on top
-