public class SkinPacketTracker extends Object
Used as one instance per NPC entity.
Constructor and Description |
---|
SkinPacketTracker(SkinnableEntity entity)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Skin |
getSkin()
Get the NPC skin.
|
void |
notifySkinChange(boolean forceUpdate)
Notify that the NPC skin has been changed.
|
void |
onRemoveNPC()
Invoke when the NPC entity is removed.
|
void |
onSpawnNPC()
Invoke when the NPC entity is spawned.
|
void |
updateNearbyViewers(double radius)
Send skin related packets to all nearby players within the specified block radius.
|
void |
updateViewer(org.bukkit.entity.Player player)
Send skin related packets to a player.
|
public SkinPacketTracker(SkinnableEntity entity)
entity
- The skinnable entity the instance belongs to.public Skin getSkin()
public void notifySkinChange(boolean forceUpdate)
public void onRemoveNPC()
Sends remove packets to all players.
public void onSpawnNPC()
public void updateNearbyViewers(double radius)
radius
- The radius.public void updateViewer(org.bukkit.entity.Player player)
player
- The player.Copyright © 2021. All rights reserved.