This commit is contained in:
nossr50 2011-04-10 03:28:09 -07:00
parent 5ceb50d8c5
commit f058923b73
5 changed files with 19 additions and 15 deletions

View File

@ -1,5 +1,8 @@
Changelog: Changelog:
#Versions without changelogs probably had very small misc fixes, like tweaks to the source code# #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 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 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) Archery Spam has been nerf'd, you can only fire once per second now (Toggle-able in config file)

View File

@ -127,12 +127,12 @@ public class mcBlockListener extends BlockListener {
/* /*
* EXCAVATION * EXCAVATION
*/ */
if(mcPermissions.getInstance().excavation(player) && block != null && player != null) if(mcPermissions.getInstance().excavation(player) && block.getData() != (byte) 5)
mcExcavation.getInstance().excavationProcCheck(block, player); mcExcavation.getInstance().excavationProcCheck(block, player);
/* /*
* HERBALISM * HERBALISM
*/ */
if(mcPermissions.getInstance().herbalism(player)) if(mcPermissions.getInstance().herbalism(player) && block.getData() != (byte) 5)
mcHerbalism.getInstance().herbalismProcCheck(block, player); mcHerbalism.getInstance().herbalismProcCheck(block, player);
//Change the byte back when broken //Change the byte back when broken
if(block.getData() == 5) if(block.getData() == 5)

View File

@ -69,7 +69,7 @@ public class mcExcavation {
Location loc = block.getLocation(); Location loc = block.getLocation();
ItemStack is = null; ItemStack is = null;
Material mat = null; Material mat = null;
if(block.getData() == 5){ if(block.getData() == (byte) 5){
return; return;
} }
if(type == 2){ if(type == 2){

View File

@ -112,7 +112,7 @@ public class mcMining {
} }
} }
public void miningBlockCheck(Player player, Block block){ public void miningBlockCheck(Player player, Block block){
if(mcConfig.getInstance().isBlockWatched(block)) if(mcConfig.getInstance().isBlockWatched(block) || block.getData() == (byte) 5)
return; return;
int xp = 0; int xp = 0;
if(block.getTypeId() == 1 || block.getTypeId() == 24){ if(block.getTypeId() == 1 || block.getTypeId() == 24){
@ -182,7 +182,7 @@ public class mcMining {
byte damage = 0; byte damage = 0;
ItemStack item = new ItemStack(mat, 1, (byte)0, damage); ItemStack item = new ItemStack(mat, 1, (byte)0, damage);
if(block.getTypeId() == 1 || block.getTypeId() == 24){ if(block.getTypeId() == 1 || block.getTypeId() == 24){
if(!mcConfig.getInstance().isBlockWatched(block)){ if(!mcConfig.getInstance().isBlockWatched(block) && block.getData() != (byte) 5){
xp += 3; xp += 3;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -198,7 +198,7 @@ public class mcMining {
} }
//NETHERRACK //NETHERRACK
if(block.getTypeId() == 87){ if(block.getTypeId() == 87){
if(!mcConfig.getInstance().isBlockWatched(block)){ if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){
xp += 3; xp += 3;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -210,7 +210,7 @@ public class mcMining {
} }
//GLOWSTONE //GLOWSTONE
if(block.getTypeId() == 89){ if(block.getTypeId() == 89){
if(!mcConfig.getInstance().isBlockWatched(block)){ if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){
xp += 3; xp += 3;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -222,7 +222,7 @@ public class mcMining {
} }
//COAL //COAL
if(block.getTypeId() == 16){ if(block.getTypeId() == 16){
if(!mcConfig.getInstance().isBlockWatched(block)){ if(!mcConfig.getInstance().isBlockWatched(block)&& block.getData() != (byte) 5){
xp += 10; xp += 10;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -234,7 +234,7 @@ public class mcMining {
} }
//GOLD //GOLD
if(block.getTypeId() == 14 && mcm.getInstance().getTier(player) >= 3){ 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; xp += 35;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -245,7 +245,7 @@ public class mcMining {
} }
//DIAMOND //DIAMOND
if(block.getTypeId() == 56 && mcm.getInstance().getTier(player) >= 3){ 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; xp += 75;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -257,7 +257,7 @@ public class mcMining {
} }
//IRON //IRON
if(block.getTypeId() == 15 && mcm.getInstance().getTier(player) >= 2){ 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; xp += 25;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -268,7 +268,7 @@ public class mcMining {
} }
//REDSTONE //REDSTONE
if((block.getTypeId() == 73 || block.getTypeId() == 74) && mcm.getInstance().getTier(player) >= 4){ 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; xp += 15;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -285,7 +285,7 @@ public class mcMining {
} }
//LAPUS //LAPUS
if(block.getTypeId() == 21 && mcm.getInstance().getTier(player) >= 3){ 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; xp += 40;
blockProcCheck(block, player); blockProcCheck(block, player);
blockProcCheck(block, player); blockProcCheck(block, player);
@ -298,6 +298,7 @@ public class mcMining {
loc.getWorld().dropItemNaturally(loc, item); loc.getWorld().dropItemNaturally(loc, item);
block.setType(Material.AIR); block.setType(Material.AIR);
} }
if(block.getData() != (byte) 5)
mcUsers.getProfile(player).addMiningGather(xp * mcLoadProperties.xpGainMultiplier); mcUsers.getProfile(player).addMiningGather(xp * mcLoadProperties.xpGainMultiplier);
mcSkills.getInstance().XpCheck(player); mcSkills.getInstance().XpCheck(player);
} }

View File

@ -1,3 +1,3 @@
name: mcMMO name: mcMMO
main: com.gmail.nossr50.mcMMO main: com.gmail.nossr50.mcMMO
version: 0.9.18 version: 0.9.19