Log animation to avoid damage conflict with Thorns. Fixes #177

This commit is contained in:
h31ix committed 2013-02-21 17:29:04 -05:00
1 parent 72a54df16e
commit 121047e6d3
2 files changed
+17

No files matched your search

@@ -31,6 +31,8 @@ import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.NumberConversions;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
public final class Utilities {
private static final List<Material> INSTANT_BREAK = new ArrayList<Material>();
private static final List<Material> FOOD = new ArrayList<Material>();
@@ -220,6 +222,15 @@ public final class Utilities {
public static String [] getCommands(String command) {
return command.replaceAll("COMMAND\\[", "").replaceAll("]", "").split(";");
}
public static boolean hasArmorEnchantment(Player player, Enchantment e) {
for(ItemStack is : player.getInventory().getArmorContents()) {
if(is != null && is.containsEnchantment(e)) {
return true;
}
}
return false;
}
static {
INSTANT_BREAK.add(Material.RED_MUSHROOM);