Fixed Leaf Blower not respected the unlock level set in advanced.yml

This commit is contained in:
GJ 2013-01-25 12:41:39 -05:00
parent a7be57241c
commit c220f0dee5
2 changed files with 3 additions and 3 deletions

View File

@ -20,6 +20,7 @@ Version 1.4.00-dev
= Fixed Woodcutting accidentally using Mining double drop values. = Fixed Woodcutting accidentally using Mining double drop values.
= Fixed Hylian Luck not removing the block-placed flag from flowers. = Fixed Hylian Luck not removing the block-placed flag from flowers.
= Fixed Hylian Luck not checking the block-placed flag on flowers. = Fixed Hylian Luck not checking the block-placed flag on flowers.
= Fixed Leaf Blower not respected the unlock level set in advanced.yml
! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent ! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent
! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR. ! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR.
! Changed how Tree Feller is handled, it should now put less stress on the CPU ! Changed how Tree Feller is handled, it should now put less stress on the CPU

View File

@ -20,6 +20,7 @@ import org.bukkit.metadata.FixedMetadataValue;
import org.getspout.spoutapi.sound.SoundEffect; import org.getspout.spoutapi.sound.SoundEffect;
import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.mcMMO;
import com.gmail.nossr50.config.AdvancedConfig;
import com.gmail.nossr50.config.Config; import com.gmail.nossr50.config.Config;
import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.datatypes.PlayerProfile;
import com.gmail.nossr50.events.fake.FakeBlockBreakEvent; import com.gmail.nossr50.events.fake.FakeBlockBreakEvent;
@ -249,12 +250,10 @@ public class BlockListener implements Listener {
*/ */
@EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true)
public void onBlockDamage(BlockDamageEvent event) { public void onBlockDamage(BlockDamageEvent event) {
if (event instanceof FakeBlockDamageEvent) { if (event instanceof FakeBlockDamageEvent) {
return; return;
} }
final int LEAF_BLOWER_LEVEL = 100;
Player player = event.getPlayer(); Player player = event.getPlayer();
@ -342,7 +341,7 @@ public class BlockListener implements Listener {
miningManager.superBreakerBlockCheck(block); miningManager.superBreakerBlockCheck(block);
} }
} }
else if (profile.getSkillLevel(SkillType.WOODCUTTING) >= LEAF_BLOWER_LEVEL && (material.equals(Material.LEAVES) || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLeafBlock(block)))) { else if (profile.getSkillLevel(SkillType.WOODCUTTING) >= AdvancedConfig.getInstance().getLeafBlowUnlockLevel() && (material.equals(Material.LEAVES) || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLeafBlock(block)))) {
if (Skills.triggerCheck(player, block, AbilityType.LEAF_BLOWER)) { if (Skills.triggerCheck(player, block, AbilityType.LEAF_BLOWER)) {
if (configInstance.getWoodcuttingRequiresTool()) { if (configInstance.getWoodcuttingRequiresTool()) {
if (ItemChecks.isAxe(inHand)) { if (ItemChecks.isAxe(inHand)) {