Ignore cancelled NPC despawns

This commit is contained in:
fullwall 2016-06-12 23:45:23 +08:00
parent 1d45fe1d3e
commit 0c4044111e

View File

@ -358,7 +358,7 @@ public class EventListen implements Listener {
toRespawn.put(coord, event.getNPC());
}
@EventHandler
@EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onNPCDespawn(NPCDespawnEvent event) {
if (event.getReason() == DespawnReason.PLUGIN || event.getReason() == DespawnReason.REMOVAL
|| event.getReason() == DespawnReason.RELOAD) {