diff --git a/Changelog.txt b/Changelog.txt index ffc96493d..d680fa170 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -18,6 +18,7 @@ Version 1.3.00-dev + Re-added mcMMO reporting damage events = Fixed /mcability not respecting permissions = Prettied up new config files + ! Changed mob spawn tracking to use Unique Entity ID instead of Entity Object ! Changed stats command name to mcstats for better plugin compatibility ! Changed god mode to turn off if player enters world where he does not have mcgod permission ! Changed Taming to also gain XP from shearing diff --git a/src/main/java/com/gmail/nossr50/Combat.java b/src/main/java/com/gmail/nossr50/Combat.java index 3fc8e1b66..54f2597d8 100644 --- a/src/main/java/com/gmail/nossr50/Combat.java +++ b/src/main/java/com/gmail/nossr50/Combat.java @@ -131,7 +131,7 @@ public class Combat } } - if(!pluginx.misc.mobSpawnerList.contains(event.getEntity())) + if(!pluginx.misc.mobSpawnerList.contains(event.getEntity().getEntityId())) { int xp = getXp(event.getEntity(), event); @@ -221,7 +221,7 @@ public class Combat master.sendMessage(mcLocale.getString("Combat.Gore")); //$NON-NLS-1$ } - if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity())) + if(!event.getEntity().isDead() && !pluginx.misc.mobSpawnerList.contains(event.getEntity().getEntityId())) { int xp = getXp(event.getEntity(), event); Users.getProfile(master).addXP(SkillType.TAMING, xp*10, master); @@ -336,7 +336,7 @@ public class Combat /* * Defender is Monster */ - if(!pluginx.misc.mobSpawnerList.contains(x)) + if(!pluginx.misc.mobSpawnerList.contains(x.getEntityId())) { int xp = getXp(event.getEntity(), event); PPa.addXP(SkillType.ARCHERY, xp*10, attacker); diff --git a/src/main/java/com/gmail/nossr50/config/Misc.java b/src/main/java/com/gmail/nossr50/config/Misc.java index d4aaa4f4b..58bee0a5a 100644 --- a/src/main/java/com/gmail/nossr50/config/Misc.java +++ b/src/main/java/com/gmail/nossr50/config/Misc.java @@ -31,7 +31,7 @@ public class Misc protected static final Logger log = Logger.getLogger("Minecraft"); - public ArrayList mobSpawnerList = new ArrayList(); + public ArrayList mobSpawnerList = new ArrayList(); public HashSet blockWatchList = new HashSet(); public HashMap arrowTracker = new HashMap(); public ArrayList bleedTracker = new ArrayList(); diff --git a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java index 91caf9dc0..0a8852d44 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcEntityListener.java @@ -207,7 +207,7 @@ public class mcEntityListener implements Listener if(reason == SpawnReason.SPAWNER && !LoadProperties.xpGainsMobSpawners) { - plugin.misc.mobSpawnerList.add(event.getEntity()); + plugin.misc.mobSpawnerList.add(event.getEntity().getEntityId()); } }