diff options
author | md_5 <md_5@bigpond.com> | 2012-04-05 20:48:51 +1000 |
---|---|---|
committer | md_5 <md_5@bigpond.com> | 2012-04-05 20:48:51 +1000 |
commit | 501e510cb34c768f4c6543e9636a10526d4af807 (patch) | |
tree | 290be20a40a0da2204c0f5179376e6023903be19 /EssentialsAntiCheat/src/com/earth2me/essentials | |
parent | 2ce7f5726fc1261452c3d2f87def3e713422f38b (diff) | |
download | Essentials-501e510cb34c768f4c6543e9636a10526d4af807.tar Essentials-501e510cb34c768f4c6543e9636a10526d4af807.tar.gz Essentials-501e510cb34c768f4c6543e9636a10526d4af807.tar.lz Essentials-501e510cb34c768f4c6543e9636a10526d4af807.tar.xz Essentials-501e510cb34c768f4c6543e9636a10526d4af807.zip |
But EvenPrime Bukkit does it for you!
Diffstat (limited to 'EssentialsAntiCheat/src/com/earth2me/essentials')
-rw-r--r-- | EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/CheckUtil.java | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/CheckUtil.java b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/CheckUtil.java index 30e9a3fba..521d4e31b 100644 --- a/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/CheckUtil.java +++ b/EssentialsAntiCheat/src/com/earth2me/essentials/anticheat/checks/CheckUtil.java @@ -85,7 +85,6 @@ public class CheckUtil // Until I can think of a better way to determine if a block is solid or // not, this is what I'll do private static final int types[]; - private static final Set<Material> foods = EnumSet.noneOf(Material.class); static { @@ -157,24 +156,6 @@ public class CheckUtil // nonsolid too types[Material.STONE_PLATE.getId()] = SOLID | NONSOLID; types[Material.WOOD_PLATE.getId()] = SOLID | NONSOLID; - - // We need to know what is considered food for the instanteat check - foods.add(Material.APPLE); - foods.add(Material.BREAD); - foods.add(Material.COOKED_BEEF); - foods.add(Material.COOKED_CHICKEN); - foods.add(Material.COOKED_FISH); - foods.add(Material.COOKIE); - foods.add(Material.GOLDEN_APPLE); - foods.add(Material.GRILLED_PORK); - foods.add(Material.MELON); - foods.add(Material.MUSHROOM_SOUP); - foods.add(Material.PORK); - foods.add(Material.RAW_BEEF); - foods.add(Material.RAW_CHICKEN); - foods.add(Material.RAW_FISH); - foods.add(Material.ROTTEN_FLESH); - foods.add(Material.SPIDER_EYE); } /** @@ -363,6 +344,6 @@ public class CheckUtil { return false; } - return foods.contains(item.getType()); + return item.getType().isEdible(); } } |