mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-17 08:05:20 +01:00
Made priming TNT by punching it with flint and steel throw a block break blacklist event.
This commit is contained in:
parent
b938271b4d
commit
6b9a3aff58
@ -54,6 +54,7 @@
|
||||
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldguard.LocalPlayer;
|
||||
import com.sk89q.worldguard.blacklist.events.BlockBreakBlacklistEvent;
|
||||
import com.sk89q.worldguard.blacklist.events.BlockInteractBlacklistEvent;
|
||||
import com.sk89q.worldguard.blacklist.events.ItemAcquireBlacklistEvent;
|
||||
import com.sk89q.worldguard.blacklist.events.ItemDropBlacklistEvent;
|
||||
@ -452,6 +453,18 @@ private void handleBlockLeftClick(PlayerInteractEvent event) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (type == Material.TNT && player.getItemInHand().getType() == Material.FLINT_AND_STEEL) {
|
||||
if (wcfg.getBlacklist() != null) {
|
||||
if (!wcfg.getBlacklist().check(
|
||||
new BlockBreakBlacklistEvent(plugin.wrapPlayer(player),
|
||||
toVector(event.getClickedBlock()),
|
||||
event.getClickedBlock().getTypeId()), false, false)) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user