fixed NullPointerException

This commit is contained in:
NewGarbo 2015-11-15 15:05:18 +00:00
parent 1d8366487b
commit 2aa7dd13c3

View File

@ -258,7 +258,7 @@ public abstract class EventCreature<T extends LivingEntity> implements Listener
@EventHandler
public void onChunkUnload(ChunkUnloadEvent event)
{
if (event.getChunk().equals(_entity.getLocation().getChunk()))
if (_entity.getLocation().getChunk().equals(event.getChunk()))
event.setCancelled(true);
}