From a2c83425f29323ec3975b1155905a435faa84c5c Mon Sep 17 00:00:00 2001 From: nossr50 Date: Thu, 9 Feb 2012 09:47:17 -0800 Subject: [PATCH] Fixed even more of GJ's mistakes :P --- src/main/java/com/gmail/nossr50/skills/Archery.java | 4 ++-- src/main/java/com/gmail/nossr50/skills/Mining.java | 2 +- src/main/java/com/gmail/nossr50/skills/Repair.java | 2 +- src/main/java/com/gmail/nossr50/skills/WoodCutting.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Archery.java b/src/main/java/com/gmail/nossr50/skills/Archery.java index 5be68be64..8f5e0bd6d 100644 --- a/src/main/java/com/gmail/nossr50/skills/Archery.java +++ b/src/main/java/com/gmail/nossr50/skills/Archery.java @@ -37,7 +37,7 @@ public class Archery pluginx.misc.arrowTracker.put(x, 0); if(attacker != null) { - if( (Math.random() * 1000 <= PPa.getSkillLevel(SkillType.ARCHERY)) || PPa.getSkillLevel(SkillType.ARCHERY) > 1000) + if(PPa.getSkillLevel(SkillType.ARCHERY) > 1000 || (Math.random() * 1000 <= PPa.getSkillLevel(SkillType.ARCHERY))) { pluginx.misc.arrowTracker.put(x, 1); } @@ -48,7 +48,7 @@ public class Archery { if(attacker != null) { - if( (Math.random() * 1000 <= PPa.getSkillLevel(SkillType.ARCHERY)) || PPa.getSkillLevel(SkillType.ARCHERY) > 1000) + if(PPa.getSkillLevel(SkillType.ARCHERY) > 1000 || (Math.random() * 1000 <= PPa.getSkillLevel(SkillType.ARCHERY))) { pluginx.misc.arrowTracker.put(x, 1); } diff --git a/src/main/java/com/gmail/nossr50/skills/Mining.java b/src/main/java/com/gmail/nossr50/skills/Mining.java index 1665141c2..e1bbf741a 100644 --- a/src/main/java/com/gmail/nossr50/skills/Mining.java +++ b/src/main/java/com/gmail/nossr50/skills/Mining.java @@ -170,7 +170,7 @@ public class Mining { PlayerProfile PP = Users.getProfile(player); - if((Math.random() * 1000 <= PP.getSkillLevel(SkillType.MINING)) || PP.getSkillLevel(SkillType.MINING) > 1000) + if(PP.getSkillLevel(SkillType.MINING) > 1000 || (Math.random() * 1000 <= PP.getSkillLevel(SkillType.MINING))) { blockProcSimulate(block, player); return; diff --git a/src/main/java/com/gmail/nossr50/skills/Repair.java b/src/main/java/com/gmail/nossr50/skills/Repair.java index 896bd6592..9dc7e1ccc 100644 --- a/src/main/java/com/gmail/nossr50/skills/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/Repair.java @@ -742,7 +742,7 @@ public class Repair { PlayerProfile PP = Users.getProfile(player); if(player != null) { - if((Math.random() * 1000 <= PP.getSkillLevel(SkillType.REPAIR)) || PP.getSkillLevel(SkillType.REPAIR) > 1000) + if(PP.getSkillLevel(SkillType.REPAIR) > 1000 || (Math.random() * 1000 <= PP.getSkillLevel(SkillType.REPAIR))) { player.sendMessage(mcLocale.getString("Skills.FeltEasy")); return true; diff --git a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java index c86bc1fa6..ce90f3171 100644 --- a/src/main/java/com/gmail/nossr50/skills/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/WoodCutting.java @@ -49,7 +49,7 @@ public class WoodCutting Material mat = Material.getMaterial(block.getTypeId()); if(player != null) { - if((Math.random() * 1000 <= PP.getSkillLevel(SkillType.WOODCUTTING)) || PP.getSkillLevel(SkillType.WOODCUTTING) > 1000) + if(PP.getSkillLevel(SkillType.WOODCUTTING) > 1000 || (Math.random() * 1000 <= PP.getSkillLevel(SkillType.WOODCUTTING))) { ItemStack item = new ItemStack(mat, 1, (short) 0, type); m.mcDropItem(block.getLocation(), item);