diff --git a/mcMMO/Changelog.txt b/mcMMO/Changelog.txt index 2586285a0..69799a966 100644 --- a/mcMMO/Changelog.txt +++ b/mcMMO/Changelog.txt @@ -1,5 +1,8 @@ Changelog: #Versions without changelogs probably had very small misc fixes, like tweaks to the source code# +Version 0.9.19 +Fixed Anti-Exploit XP stuff not working + Version 0.9.18 Added failsafe to prevent abilities from going on forever, abilities will check if they should've expired when being used in case the Timer fails Archery Spam has been nerf'd, you can only fire once per second now (Toggle-able in config file) diff --git a/mcMMO/com/gmail/nossr50/mcBlockListener.java b/mcMMO/com/gmail/nossr50/mcBlockListener.java index d497751ea..8f989a6dd 100644 --- a/mcMMO/com/gmail/nossr50/mcBlockListener.java +++ b/mcMMO/com/gmail/nossr50/mcBlockListener.java @@ -127,12 +127,12 @@ public class mcBlockListener extends BlockListener { /* * EXCAVATION */ - if(mcPermissions.getInstance().excavation(player) && block != null && player != null) + if(mcPermissions.getInstance().excavation(player) && block.getData() != (byte) 5) mcExcavation.getInstance().excavationProcCheck(block, player); /* * HERBALISM */ - if(mcPermissions.getInstance().herbalism(player)) + if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5) mcHerbalism.getInstance().herbalismProcCheck(block, player); //Change the byte back when broken if(block.getData() == 5) diff --git a/mcMMO/com/gmail/nossr50/mcExcavation.java b/mcMMO/com/gmail/nossr50/mcExcavation.java index 7bd68f05e..e67f85f62 100644 --- a/mcMMO/com/gmail/nossr50/mcExcavation.java +++ b/mcMMO/com/gmail/nossr50/mcExcavation.java @@ -69,7 +69,7 @@ public class mcExcavation { Location loc = block.getLocation(); ItemStack is = null; Material mat = null; - if(block.getData() == 5){ + if(block.getData() == (byte) 5){ return; } if(type == 2){ diff --git a/mcMMO/com/gmail/nossr50/mcMining.java b/mcMMO/com/gmail/nossr50/mcMining.java index 4c1b7b52a..b47da5ccc 100644 --- a/mcMMO/com/gmail/nossr50/mcMining.java +++ b/mcMMO/com/gmail/nossr50/mcMining.java @@ -112,7 +112,7 @@ public class mcMining { } } public void miningBlockCheck(Player player, Block block){ - if(mcConfig.getInstance().isBlockWatched(block)) + if(mcConfig.getInstance().isBlockWatched(block) || block.getData() == (byte) 5) return; int xp = 0; if(block.getTypeId() == 1 || block.getTypeId() == 24){ @@ -182,7 +182,7 @@ public class mcMining { byte damage = 0; ItemStack item = new ItemStack(mat, 1, (byte)0, damage); if(block.getTypeId() == 1 || block.getTypeId() == 24){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block) && block.getData() != (byte) 5){ xp += 3; blockProcCheck(block, player); blockProcCheck(block, player); @@ -198,7 +198,7 @@ public class mcMining { } //NETHERRACK if(block.getTypeId() == 87){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 3; blockProcCheck(block, player); blockProcCheck(block, player); @@ -210,7 +210,7 @@ public class mcMining { } //GLOWSTONE if(block.getTypeId() == 89){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 3; blockProcCheck(block, player); blockProcCheck(block, player); @@ -222,7 +222,7 @@ public class mcMining { } //COAL if(block.getTypeId() == 16){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 10; blockProcCheck(block, player); blockProcCheck(block, player); @@ -234,7 +234,7 @@ public class mcMining { } //GOLD if(block.getTypeId() == 14 && mcm.getInstance().getTier(player) >= 3){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 35; blockProcCheck(block, player); blockProcCheck(block, player); @@ -245,7 +245,7 @@ public class mcMining { } //DIAMOND if(block.getTypeId() == 56 && mcm.getInstance().getTier(player) >= 3){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 75; blockProcCheck(block, player); blockProcCheck(block, player); @@ -257,7 +257,7 @@ public class mcMining { } //IRON if(block.getTypeId() == 15 && mcm.getInstance().getTier(player) >= 2){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 25; blockProcCheck(block, player); blockProcCheck(block, player); @@ -268,7 +268,7 @@ public class mcMining { } //REDSTONE if((block.getTypeId() == 73 || block.getTypeId() == 74) && mcm.getInstance().getTier(player) >= 4){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 15; blockProcCheck(block, player); blockProcCheck(block, player); @@ -285,7 +285,7 @@ public class mcMining { } //LAPUS if(block.getTypeId() == 21 && mcm.getInstance().getTier(player) >= 3){ - if(!mcConfig.getInstance().isBlockWatched(block)){ + if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){ xp += 40; blockProcCheck(block, player); blockProcCheck(block, player); @@ -298,7 +298,8 @@ public class mcMining { loc.getWorld().dropItemNaturally(loc, item); block.setType(Material.AIR); } - mcUsers.getProfile(player).addMiningGather(xp * mcLoadProperties.xpGainMultiplier); + if(block.getData() != (byte) 5) + mcUsers.getProfile(player).addMiningGather(xp * mcLoadProperties.xpGainMultiplier); mcSkills.getInstance().XpCheck(player); } } diff --git a/mcMMO/plugin.yml b/mcMMO/plugin.yml index 8c42e2a99..d08c6df2a 100644 --- a/mcMMO/plugin.yml +++ b/mcMMO/plugin.yml @@ -1,3 +1,3 @@ name: mcMMO main: com.gmail.nossr50.mcMMO -version: 0.9.18 \ No newline at end of file +version: 0.9.19 \ No newline at end of file