This commit is contained in:
aPunch 2012-01-15 13:33:49 -06:00
parent d7d3d72856
commit dbecb5763d

View File

@ -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);
}