mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-22 10:36:10 +01:00
fix bug
This commit is contained in:
parent
d6a907d7e5
commit
b10094d441
@ -145,6 +145,8 @@ public class CitizensNPC implements NPC {
|
||||
if (spawnEvent.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
spawned = true;
|
||||
addTrait(new LocationTrait(loc));
|
||||
mcEntity = manager.spawn(this, loc);
|
||||
}
|
||||
@ -158,6 +160,7 @@ public class CitizensNPC implements NPC {
|
||||
|
||||
Bukkit.getPluginManager().callEvent(new NPCDespawnEvent(this));
|
||||
|
||||
spawned = false;
|
||||
mcEntity.die();
|
||||
manager.despawn(this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user