mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-02-03 14:02:01 +01:00
Update custom name status immediately on spawn
This commit is contained in:
parent
82c33ebfe3
commit
f3986ec9cc
@ -268,12 +268,6 @@ public class CitizensNPC extends AbstractNPC {
|
||||
NMS.setHeadYaw(getEntity(), at.getYaw());
|
||||
NMS.setBodyYaw(getEntity(), at.getYaw());
|
||||
|
||||
String nameplateVisible = data().<Object> get(NPC.NAMEPLATE_VISIBLE_METADATA, true).toString();
|
||||
if (requiresNameHologram()) {
|
||||
nameplateVisible = "false";
|
||||
}
|
||||
getEntity().setCustomNameVisible(Boolean.parseBoolean(nameplateVisible));
|
||||
|
||||
// Set the spawned state
|
||||
getTrait(CurrentLocation.class).setLocation(at);
|
||||
getTrait(Spawned.class).setSpawned(true);
|
||||
@ -323,6 +317,7 @@ public class CitizensNPC extends AbstractNPC {
|
||||
}
|
||||
|
||||
updateFlyableState();
|
||||
updateCustomName();
|
||||
|
||||
Messaging.debug("Spawned", getId(), "SpawnReason." + reason);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user