Class PlayerHudsHolderWrapper
java.lang.Object
dev.lone.itemsadder.api.FontImages.PlayerHudsHolderWrapper
Class representing a container which holds all HUDs of a player.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexists()Check if the player HUDs holder is correctly registered in ItemsAdder.@Nullable ObjectGets the internal ItemsAdder object.org.bukkit.entity.PlayerGet owner of this holder.voidForce the recalculation the offsets if you have shown a new HUD, added/removed new font images to aPlayerCustomHudWrapperHUD.voidForces the HUDs rendering packet to be sent to the player, this is useful if you have high frequency HUDs.
-
Constructor Details
-
PlayerHudsHolderWrapper
public PlayerHudsHolderWrapper(org.bukkit.entity.Player player)
-
-
Method Details
-
getInternal
Gets the internal ItemsAdder object. Should only be used by the plugin developer. -
exists
public boolean exists()Check if the player HUDs holder is correctly registered in ItemsAdder. -
getPlayer
public org.bukkit.entity.Player getPlayer()Get owner of this holder.- Returns:
- Owner of this holder.
-
recalculateOffsets
public void recalculateOffsets()Force the recalculation the offsets if you have shown a new HUD, added/removed new font images to aPlayerCustomHudWrapperHUD. -
sendUpdate
public void sendUpdate()Forces the HUDs rendering packet to be sent to the player, this is useful if you have high frequency HUDs. Be careful sending this too fast, it may use a lot of bandwidth if you abuse it.
-