Check isSpawned in HologramTrait#onSpawn

This commit is contained in:
fullwall 2021-08-27 17:30:27 +08:00
parent 14a6004adf
commit 11c48c4e09

View File

@ -149,6 +149,8 @@ public class HologramTrait extends Trait {
@Override
public void onSpawn() {
if (!npc.isSpawned())
return;
currentLoc = npc.getStoredLocation();
if (npc.requiresNameHologram()
&& Boolean.parseBoolean(npc.data().<Object> get(NPC.NAMEPLATE_VISIBLE_METADATA, true).toString())) {