Class DataWatcherHelper
java.lang.Object
me.neznamy.tab.platforms.bukkit.nms.datawatcher.DataWatcherHelper
A class to help to assign DataWatcher items as positions often change per-version
-
Constructor Summary
ConstructorsConstructorDescriptionDataWatcherHelper(DataWatcher data) Constructs new instance of this class with given parent -
Method Summary
Modifier and TypeMethodDescriptionvoidsetArmorStandFlags(byte flags) Writes armor stand flagsvoidsetCustomName(String customName, me.neznamy.tab.api.ProtocolVersion clientVersion) Writes entity custom name with position based on server version and value depending on client version (RGB or not)voidsetCustomNameVisible(boolean visible) Writes custom name visibility booleanvoidsetEntityFlags(byte flags) Writes entity byte flagsvoidsetHealth(float health) Writes entity health
-
Constructor Details
-
DataWatcherHelper
Constructs new instance of this class with given parent- Parameters:
data- data to write to
-
-
Method Details
-
setEntityFlags
public void setEntityFlags(byte flags) Writes entity byte flags- Parameters:
flags- flags to write
-
setCustomName
Writes entity custom name with position based on server version and value depending on client version (RGB or not)- Parameters:
customName- target custom nameclientVersion- client version
-
setCustomNameVisible
public void setCustomNameVisible(boolean visible) Writes custom name visibility boolean- Parameters:
visible- if visible or not
-
setHealth
public void setHealth(float health) Writes entity health- Parameters:
health- health of entity
-
setArmorStandFlags
public void setArmorStandFlags(byte flags) Writes armor stand flags- Parameters:
flags- flags to write
-