mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 18:55:25 +01:00
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:
parent
5f33e51fae
commit
7bbb4fbf44
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user