mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-25 10:37:41 +01:00
Added override for flint and steel blocking.
This commit is contained in:
parent
af5d0c4b0e
commit
9e15a4a557
@ -262,12 +262,12 @@ public void onBlockIgnite(BlockIgniteEvent event) {
|
|||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
if (wcfg.blockLighter && cause == IgniteCause.FLINT_AND_STEEL) {
|
if (wcfg.blockLighter && cause == IgniteCause.FLINT_AND_STEEL) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
if (wcfg.fireSpreadDisableToggle && isFireSpread) {
|
if (wcfg.fireSpreadDisableToggle && isFireSpread) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
|
@ -140,7 +140,14 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
|||||||
|
|
||||||
ConfigurationManager cfg = plugin.getGlobalConfiguration();
|
ConfigurationManager cfg = plugin.getGlobalConfiguration();
|
||||||
WorldConfiguration wcfg = cfg.get(world);
|
WorldConfiguration wcfg = cfg.get(world);
|
||||||
|
|
||||||
|
if (wcfg.blockLighter && item.getType() == Material.FLINT_AND_STEEL) {
|
||||||
|
if (!plugin.hasPermission(player, "worldguard.lighter.override")) {
|
||||||
|
event.setCancelled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (wcfg.useRegions) {
|
if (wcfg.useRegions) {
|
||||||
Vector pt = toVector(block);
|
Vector pt = toVector(block);
|
||||||
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
||||||
@ -170,7 +177,8 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (item.getType() == Material.FLINT_AND_STEEL) {
|
if (item.getType() == Material.FLINT_AND_STEEL) {
|
||||||
if (!set.allows(DefaultFlag.LIGHTER)) {
|
if (!set.allows(DefaultFlag.LIGHTER)
|
||||||
|
&& !plugin.hasPermission(player, "worldguard.lighter.override")) {
|
||||||
event.setCancelled(true);
|
event.setCancelled(true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user