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

This commit is contained in:
Brettflan 2012-10-19 00:11:37 -05:00
parent ea2da7ea9f
commit 1a4286c379
1 changed files with 2 additions and 2 deletions

View File

@ -216,8 +216,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();
}
}