From 80abd0db91f20cc7c4f35a18f870d275436b6403 Mon Sep 17 00:00:00 2001 From: gmcferrin Date: Sat, 4 Feb 2012 08:48:37 -0500 Subject: [PATCH] Fixed issue with Silk Touch & Double/Triple drops while mining. --- src/main/java/com/gmail/nossr50/skills/Mining.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/Mining.java b/src/main/java/com/gmail/nossr50/skills/Mining.java index 6a1fbc59c..5ebd5f7ef 100644 --- a/src/main/java/com/gmail/nossr50/skills/Mining.java +++ b/src/main/java/com/gmail/nossr50/skills/Mining.java @@ -16,8 +16,6 @@ */ package com.gmail.nossr50.skills; -import net.minecraft.server.Enchantment; - import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.Statistic; @@ -25,6 +23,7 @@ import org.bukkit.block.Block; import org.bukkit.entity.Player; import org.bukkit.inventory.ItemStack; import org.getspout.spoutapi.sound.SoundEffect; +import org.bukkit.enchantments.Enchantment; import com.gmail.nossr50.Users; import com.gmail.nossr50.m; @@ -90,7 +89,7 @@ public class Mining } //Drop natural block with Silk Touch - if(player.getItemInHand().getEnchantments().containsKey(Enchantment.SILK_TOUCH)){ + if(player.getItemInHand().containsEnchantment(Enchantment.SILK_TOUCH)){ m.mcDropItem(loc, item); return; } @@ -271,7 +270,7 @@ public class Mining PlayerProfile PP = Users.getProfile(player); if(LoadProperties.toolsLoseDurabilityFromAbilities) { - if(!player.getItemInHand().getEnchantments().containsKey(Enchantment.DURABILITY)) + if(!player.getItemInHand().containsEnchantment(Enchantment.DURABILITY)) m.damageTool(player, (short) LoadProperties.abilityDurabilityLoss); } @@ -322,7 +321,7 @@ public class Mining blockProcCheck(block, player); } //OBSIDIAN - else if(id == 49 && block.getData() != (byte) 5) + else if(id == 49 && m.getTier(player) >= 4 && block.getData() != (byte) 5) { xp += LoadProperties.mobsidian; blockProcCheck(block, player);