public class SkinUpdateTracker extends Object
EventListen
Constructor and Description |
---|
SkinUpdateTracker(Map<String,net.citizensnpcs.api.npc.NPCRegistry> registries)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
onNPCDespawn(net.citizensnpcs.api.npc.NPC npc)
Invoke when an NPC is despawned.
|
void |
onNPCNavigationBegin(net.citizensnpcs.api.npc.NPC npc)
Invoke when an NPC begins navigating.
|
void |
onNPCNavigationComplete(net.citizensnpcs.api.npc.NPC npc)
Invoke when an NPC finishes navigating.
|
void |
onNPCSpawn(net.citizensnpcs.api.npc.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 NPC's.
|
public void onNPCDespawn(net.citizensnpcs.api.npc.NPC npc)
npc
- The despawned NPC.public void onNPCNavigationBegin(net.citizensnpcs.api.npc.NPC npc)
npc
- The navigating NPC.public void onNPCNavigationComplete(net.citizensnpcs.api.npc.NPC npc)
npc
- The finished NPC.public void onNPCSpawn(net.citizensnpcs.api.npc.NPC npc)
npc
- The spawned NPC.public void onPlayerMove(Player player)
player
- The player that moved.public void removePlayer(UUID playerId)
Used when the player logs out.
playerId
- The ID of the player.public void reset()
Used when Citizens is reloaded.
public void updatePlayer(Player player, long delay, boolean reset)
player
- The player to update.delay
- The delay before sending the packets.reset
- True to hard reset the players tracking info, otherwise false.Copyright © 2019. All rights reserved.