Package net.citizensnpcs.npc.skin
Class SkinUpdateTracker
java.lang.Object
net.citizensnpcs.npc.skin.SkinUpdateTracker
Tracks skin updates for players.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onNPCDespawn
(NPC npc) Invoke when an NPC is despawned.void
onNPCNavigationBegin
(NPC npc) Invoke when an NPC begins navigating.void
Invoke when an NPC finishes navigating.void
onNPCSpawn
(NPC npc) Invoke when an NPC is spawned.void
onPlayerMove
(Player player) Invoke when a player moves.void
removePlayer
(UUID playerId) Remove a player from the tracker.void
reset()
Reset all players currently being tracked.void
updatePlayer
(Player player, long delay, boolean reset) Update a player with skin related packets from nearby skinnable NPCs.
-
Constructor Details
-
SkinUpdateTracker
public SkinUpdateTracker()Constructor.- Parameters:
registries
- Map of other registries.
-
-
Method Details
-
onNPCDespawn
Invoke when an NPC is despawned.- Parameters:
npc
- The despawned NPC.
-
onNPCSpawn
Invoke when an NPC is spawned.- Parameters:
npc
- The spawned NPC.
-
onPlayerMove
Invoke when a player moves.- Parameters:
player
- The player that moved.
-
removePlayer
Remove a player from the tracker.Used when the player logs out.
- Parameters:
playerId
- The ID of the player.
-
reset
public void reset()Reset all players currently being tracked.Used when Citizens is reloaded.
-
updatePlayer
Update a player with skin related packets from nearby skinnable NPCs.- Parameters:
player
- The player to update.delay
- The delay before sending the packets.reset
- True to hard reset the players tracking info, otherwise false.
-