Class SkinUpdateTracker

java.lang.Object
net.citizensnpcs.npc.skin.SkinUpdateTracker

public class SkinUpdateTracker extends Object
Tracks skin updates for players.
See Also:
  • Constructor Details

    • SkinUpdateTracker

      public SkinUpdateTracker()
      Constructor.
      Parameters:
      registries - Map of other registries.
  • Method Details

    • onNPCDespawn

      public void onNPCDespawn(NPC npc)
      Invoke when an NPC is despawned.
      Parameters:
      npc - The despawned NPC.
    • onNPCNavigationBegin

      public void onNPCNavigationBegin(NPC npc)
      Invoke when an NPC begins navigating.
      Parameters:
      npc - The navigating NPC.
    • onNPCNavigationComplete

      public void onNPCNavigationComplete(NPC npc)
      Invoke when an NPC finishes navigating.
      Parameters:
      npc - The finished NPC.
    • onNPCSpawn

      public void onNPCSpawn(NPC npc)
      Invoke when an NPC is spawned.
      Parameters:
      npc - The spawned NPC.
    • onPlayerMove

      public void onPlayerMove(Player player)
      Invoke when a player moves.
      Parameters:
      player - The player that moved.
    • removePlayer

      public void removePlayer(UUID playerId)
      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

      public void updatePlayer(Player player, long delay, boolean reset)
      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.