mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-23 02:55:45 +01:00
fix bug
This commit is contained in:
parent
d7d3d72856
commit
dbecb5763d
@ -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