Perf: Entity spawn event.
This commit is contained in:
1 parent
733ae089f0
commit
20e7ae00e5
1 file changed
+1
-3
@@ -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();
|
||||||
|
|||||||
Reference in new issue
Block a user