Skip to content

Commit

Permalink
Check isSpawned in HologramTrait#onSpawn
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Aug 27, 2021
1 parent 14a6004 commit 11c48c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main/src/main/java/net/citizensnpcs/trait/HologramTrait.java
Expand Up @@ -149,6 +149,8 @@ public void onRemove() {

@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())) {
Expand Down

0 comments on commit 11c48c4

Please sign in to comment.