Perf: Entity spawn event.

This commit is contained in:
ryanhamshire 2014-11-11 21:47:16 -08:00
parent 733ae089f0
commit 20e7ae00e5

View File

@ -190,10 +190,8 @@ class EntityEventHandler implements Listener
@EventHandler(priority = EventPriority.LOWEST) @EventHandler(priority = EventPriority.LOWEST)
public void onEntitySpawn(CreatureSpawnEvent event) public void onEntitySpawn(CreatureSpawnEvent event)
{ {
LivingEntity entity = event.getEntity();
//these rules apply only to creative worlds //these rules apply only to creative worlds
if(!GriefPrevention.instance.creativeRulesApply(entity.getLocation())) return; if(!GriefPrevention.instance.creativeRulesApply(event.getLocation())) return;
//chicken eggs and breeding could potentially make a mess in the wilderness, once griefers get involved //chicken eggs and breeding could potentially make a mess in the wilderness, once griefers get involved
SpawnReason reason = event.getSpawnReason(); SpawnReason reason = event.getSpawnReason();