Browse Source

Merge branch 'master' of github.com:mcMMO-Dev/mcMMO

nossr50 13 years ago
parent
commit
2c4418e6e6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java

+ 3 - 1
src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java

@@ -163,7 +163,9 @@ public class mcEntityListener implements Listener {
      */
      */
     @EventHandler (priority = EventPriority.MONITOR)
     @EventHandler (priority = EventPriority.MONITOR)
     public void onCreatureSpawn(CreatureSpawnEvent event) {
     public void onCreatureSpawn(CreatureSpawnEvent event) {
-        if (event.getSpawnReason().equals(SpawnReason.SPAWNER) && !LoadProperties.xpGainsMobSpawners) {
+        SpawnReason reason = event.getSpawnReason();
+
+        if ((reason.equals(SpawnReason.SPAWNER) || reason.equals(SpawnReason.SPAWNER_EGG)) && !LoadProperties.xpGainsMobSpawners) {
             event.getEntity().setMetadata("mcmmoFromMobSpawner", new FixedMetadataValue(plugin, true));
             event.getEntity().setMetadata("mcmmoFromMobSpawner", new FixedMetadataValue(plugin, true));
         }
         }
     }
     }