Class PlayerHudWrapper
java.lang.Object
dev.lone.itemsadder.api.FontImages.PlayerHudWrapper
- Direct Known Subclasses:
PlayerQuantityHudWrapper
Wrapper for a player HUD.
-
Constructor Summary
ConstructorsConstructorDescriptionPlayerHudWrapper(PlayerHudsHolderWrapper playerHUDsHolderWrapper, String namespacedID) Creates a player HUD wrapper. -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Checks if the wrapped HUD exists.intGets the initial X offset configured for this HUD.Gets the HUD namespaced id.intGets the current X offset.booleanChecks if this HUD is visible.voidsetOffsetX(int offset) Sets the current X offset.voidsetVisible(boolean value) Sets whether this HUD is visible.
-
Constructor Details
-
PlayerHudWrapper
Creates a player HUD wrapper.- Parameters:
playerHUDsHolderWrapper- the player's HUD holder wrapper.namespacedID- the HUD namespaced id.
-
-
Method Details
-
exists
public boolean exists()Checks if the wrapped HUD exists.- Returns:
- true if the internal HUD is present.
-
getNamespacedID
-
getInitialOffsetX
public int getInitialOffsetX()Gets the initial X offset configured for this HUD.- Returns:
- the initial X offset.
-
getOffsetX
public int getOffsetX()Gets the current X offset.- Returns:
- the current X offset.
-
setOffsetX
public void setOffsetX(int offset) Sets the current X offset.- Parameters:
offset- the new X offset.
-
setVisible
public void setVisible(boolean value) Sets whether this HUD is visible.- Parameters:
value- true to show the HUD.
-
isVisible
public boolean isVisible()Checks if this HUD is visible.- Returns:
- true if the HUD is visible.
-