From e5922bf3e7b34bc76a00be96afec3e158843b3aa Mon Sep 17 00:00:00 2001 From: GJ Date: Tue, 28 Feb 2012 00:18:55 -0500 Subject: [PATCH] Fixed my brakes. >.< --- .../com/gmail/nossr50/datatypes/AbilityType.java | 14 ++++++++++++++ .../java/com/gmail/nossr50/datatypes/ToolType.java | 14 +++++++++++++- .../gmail/nossr50/listeners/mcPlayerListener.java | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/datatypes/AbilityType.java b/src/main/java/com/gmail/nossr50/datatypes/AbilityType.java index aed8cf46d..2a2499156 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/AbilityType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/AbilityType.java @@ -84,18 +84,25 @@ public enum AbilityType { case BERSERK: PP.setBerserkMode(bool); + break; case SUPER_BREAKER: PP.setSuperBreakerMode(bool); + break; case GIGA_DRILL_BREAKER: PP.setGigaDrillBreakerMode(bool); + break; case GREEN_TERRA: PP.setGreenTerraMode(bool); + break; case SKULL_SPLIITER: PP.setSkullSplitterMode(bool); + break; case TREE_FELLER: PP.setTreeFellerMode(bool); + break; case SERRATED_STRIKES: PP.setSerratedStrikesMode(bool); + break; } } @@ -127,18 +134,25 @@ public enum AbilityType { case BERSERK: PP.setBerserkInformed(bool); + break; case SUPER_BREAKER: PP.setSuperBreakerInformed(bool); + break; case GIGA_DRILL_BREAKER: PP.setGigaDrillBreakerInformed(bool); + break; case GREEN_TERRA: PP.setGreenTerraInformed(bool); + break; case SKULL_SPLIITER: PP.setSkullSplitterInformed(bool); + break; case TREE_FELLER: PP.setTreeFellerInformed(bool); + break; case SERRATED_STRIKES: PP.setSerratedStrikesInformed(bool); + break; } } diff --git a/src/main/java/com/gmail/nossr50/datatypes/ToolType.java b/src/main/java/com/gmail/nossr50/datatypes/ToolType.java index 1560307c1..4acdd7d7b 100644 --- a/src/main/java/com/gmail/nossr50/datatypes/ToolType.java +++ b/src/main/java/com/gmail/nossr50/datatypes/ToolType.java @@ -60,16 +60,22 @@ public enum ToolType { case AXE: PP.setAxePreparationMode(bool); + break; case FISTS: PP.setFistsPreparationMode(bool); + break; case HOE: PP.setHoePreparationMode(bool); + break; case PICKAXE: PP.setPickaxePreparationMode(bool); + break; case SHOVEL: PP.setShovelPreparationMode(bool); + break; case SWORD: PP.setSwordsPreparationMode(bool); + break; } } @@ -99,16 +105,22 @@ public enum ToolType { case AXE: PP.setAxePreparationATS(ats); + break; case FISTS: PP.setFistsPreparationATS(ats); + break; case HOE: PP.setHoePreparationATS(ats); + break; case PICKAXE: PP.setPickaxePreparationATS(ats); + break; case SHOVEL: PP.setShovelPreparationATS(ats); + break; case SWORD: PP.setSwordsPreparationATS(ats); + break; } } @@ -119,7 +131,7 @@ public enum ToolType case AXE: return m.isAxes(is); case FISTS: - return is.equals(Material.AIR); + return is.getType().equals(Material.AIR); case HOE: return m.isHoe(is); case PICKAXE: diff --git a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java index 390d96194..fa9ae067f 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcPlayerListener.java @@ -224,7 +224,7 @@ public class mcPlayerListener implements Listener player.updateInventory(); } - if(LoadProperties.enableAbilities && (m.abilityBlockCheck(block) || block.getType() == Material.AIR)) + if(LoadProperties.enableAbilities && (m.abilityBlockCheck(block) || block.getType().equals(Material.AIR))) { if(block != null && m.isHoe(is) && !mat.equals(Material.DIRT) && !mat.equals(Material.GRASS) && !mat.equals(Material.SOIL)) Skills.activationCheck(player, SkillType.HERBALISM);