Fixed inverted check of mob spawner / egg entities

This commit is contained in:
bm01 2013-01-25 21:45:30 +01:00
parent 46f1157030
commit 071f7edade
2 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,7 @@ Version 1.4.00-dev
= Fixed Hylian Luck not checking the block-placed flag on flowers. = Fixed Hylian Luck not checking the block-placed flag on flowers.
= Fixed Leaf Blower not respecting the unlock level set in advanced.yml = Fixed Leaf Blower not respecting the unlock level set in advanced.yml
= Fixed abilities activating with the wrong tool in hand = Fixed abilities activating with the wrong tool in hand
= Fixed Experience.Gains.Mobspawners.Enabled not being used correctly (the check was inverted)
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent ! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR. ! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
! Changed how Tree Feller is handled, it should now put less stress on the CPU ! Changed how Tree Feller is handled, it should now put less stress on the CPU

View File

@ -217,9 +217,13 @@ public class EntityListener implements Listener {
*/ */
@EventHandler (priority = EventPriority.MONITOR, ignoreCancelled = true) @EventHandler (priority = EventPriority.MONITOR, ignoreCancelled = true)
public void onCreatureSpawn(CreatureSpawnEvent event) { public void onCreatureSpawn(CreatureSpawnEvent event) {
if (Misc.isSpawnerXPEnabled) {
return;
}
SpawnReason reason = event.getSpawnReason(); SpawnReason reason = event.getSpawnReason();
if ((reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) && Misc.isSpawnerXPEnabled) { if (reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) {
mcMMO.placeStore.addSpawnedMob(event.getEntity()); mcMMO.placeStore.addSpawnedMob(event.getEntity());
} }
} }