From 7bbb4fbf44393995c722bde1b0c20307207ecdf2 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Fri, 19 Oct 2012 00:11:28 -0500 Subject: [PATCH] Update to "handleExploitTNTWaterlog" method to not destroy Ender chests or portals; sadly there's still no method provided by Bukkit to get a block's blast resistance, so we have to go by a list of block type IDs which are supposed to be TNT-proof --- .../factions/listeners/FactionsEntityListener.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java index db3e3e60..660528e4 100644 --- a/src/com/massivecraft/factions/listeners/FactionsEntityListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsEntityListener.java @@ -140,8 +140,8 @@ public class FactionsEntityListener implements Listener for (Block target : targets) { int id = target.getTypeId(); - // ignore air, bedrock, water, lava, obsidian, enchanting table... too bad we can't get a working material durability # yet - if (id != 0 && (id < 7 || id > 11) && id != 49 && id != 116) + // ignore air, bedrock, water, lava, obsidian, enchanting table, etc.... too bad we can't get a blast resistance value through Bukkit yet + if (id != 0 && (id < 7 || id > 11) && id != 49 && id != 90 && id != 116 && id != 119 && id != 120 && id != 130) target.breakNaturally(); } }