mirror of
https://github.com/darksaid98/AntiCheatReloaded.git
synced 2026-12-02 06:28:52 +00:00
Log animation to avoid damage conflict with Thorns. Fixes #177
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user