Class BukkitArmorStandManager
java.lang.Object
me.neznamy.tab.platforms.bukkit.features.unlimitedtags.BukkitArmorStandManager
- All Implemented Interfaces:
me.neznamy.tab.api.ArmorStandManager
A helper class for easy management of armor stands of a player
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitArmorStandManager(me.neznamy.tab.shared.features.nametags.unlimited.NameTagX nameTagX, me.neznamy.tab.api.TabPlayer owner) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArmorStand(String name, me.neznamy.tab.api.ArmorStand as) Adds armor stand to list and registers it to all nearby playersvoiddestroy()voiddestroy(me.neznamy.tab.api.TabPlayer viewer) Sends destroy packet of all armor stands to specified player and removes them from nearby players listvoidFixes heights of all armor stands due to dynamic linesme.neznamy.tab.api.TabPlayer[]Returns array of nearby playersbooleanhasArmorStandWithID(int entityId) Returns true if manager contains armor stand with specified entity id, false if notbooleanisNearby(me.neznamy.tab.api.TabPlayer viewer) Returnstrueif requested player is nearby,falseif notvoidrefresh(boolean force) voidrespawn()Performs respawn operation on all armor stands to skip teleport animationvoidsneak(boolean sneaking) Sets sneak value of armor stands to specified valuevoidspawn(me.neznamy.tab.api.TabPlayer viewer) Spawns all armor stands for specified viewer and adds them into nearby playersvoidteleport()Teleports armor stands to player's current location for all nearby playersvoidteleport(me.neznamy.tab.api.TabPlayer viewer) Teleports armor stands to player's current location for specified viewervoidunregisterPlayer(me.neznamy.tab.api.TabPlayer viewer) Removes specified player from list of nearby playersvoidupdateVisibility(boolean force)
-
Constructor Details
-
Method Details
-
teleport
public void teleport(me.neznamy.tab.api.TabPlayer viewer) Teleports armor stands to player's current location for specified viewer- Parameters:
viewer- player to teleport armor stands for
-
teleport
public void teleport()Teleports armor stands to player's current location for all nearby players -
getNearbyPlayers
public me.neznamy.tab.api.TabPlayer[] getNearbyPlayers()Returns array of nearby players- Returns:
- array of nearby players
-
isNearby
public boolean isNearby(me.neznamy.tab.api.TabPlayer viewer) Returnstrueif requested player is nearby,falseif not- Parameters:
viewer- Player to check for- Returns:
trueif player nearby,falseif not
-
hasArmorStandWithID
public boolean hasArmorStandWithID(int entityId) Returns true if manager contains armor stand with specified entity id, false if not- Parameters:
entityId- entity id- Returns:
- true if armor stand with specified entity id exists, false if not
-
sneak
public void sneak(boolean sneaking) Sets sneak value of armor stands to specified value- Parameters:
sneaking- new sneaking status
-
respawn
public void respawn()Performs respawn operation on all armor stands to skip teleport animation -
spawn
public void spawn(me.neznamy.tab.api.TabPlayer viewer) Spawns all armor stands for specified viewer and adds them into nearby players- Parameters:
viewer- player to spawn armor stands for
-
fixArmorStandHeights
public void fixArmorStandHeights()Fixes heights of all armor stands due to dynamic lines -
addArmorStand
Adds armor stand to list and registers it to all nearby players- Parameters:
name- Unique identifier of the text lineas- Armor stand to add
-
unregisterPlayer
public void unregisterPlayer(me.neznamy.tab.api.TabPlayer viewer) Removes specified player from list of nearby players- Parameters:
viewer- player to remove
-
updateVisibility
public void updateVisibility(boolean force) -
destroy
public void destroy(me.neznamy.tab.api.TabPlayer viewer) Sends destroy packet of all armor stands to specified player and removes them from nearby players list- Parameters:
viewer- player to destroy armor stands for
-
destroy
public void destroy()- Specified by:
destroyin interfaceme.neznamy.tab.api.ArmorStandManager
-
refresh
public void refresh(boolean force) - Specified by:
refreshin interfaceme.neznamy.tab.api.ArmorStandManager
-