This commit is contained in:
aPunch 2012-01-15 13:33:49 -06:00
parent d6a907d7e5
commit b10094d441
1 changed files with 3 additions and 0 deletions

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