mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-02 13:31:43 +01:00
Update tablist after teleport
This commit is contained in:
parent
feb6bc2851
commit
0498353751
@ -639,6 +639,13 @@ public class EventListen implements Listener {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (npc.isSpawned()) {
|
||||
ids.remove(i--);
|
||||
if (Messaging.isDebugging()) {
|
||||
Messaging.debug("NPC", npc.getId(), "already spawned");
|
||||
}
|
||||
continue;
|
||||
}
|
||||
boolean success = spawn(npc);
|
||||
if (!success) {
|
||||
if (Messaging.isDebugging()) {
|
||||
|
@ -318,8 +318,8 @@ public class CitizensNPC extends AbstractNPC {
|
||||
@Override
|
||||
public void teleport(Location location, TeleportCause reason) {
|
||||
super.teleport(location, reason);
|
||||
if (isSpawned() && getEntity().getLocation(CACHE_LOCATION).distanceSquared(location) < 1) {
|
||||
NMS.setHeadYaw(getEntity(), location.getYaw());
|
||||
if (getEntity() instanceof SkinnableEntity) {
|
||||
((SkinnableEntity) getEntity()).getSkinTracker().updateNearbyViewers(48);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user