mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-29 12:37:46 +01:00
Added override for flint and steel blocking.
This commit is contained in:
parent
af5d0c4b0e
commit
1e8c91e92f
@ -262,12 +262,12 @@ public void onBlockIgnite(BlockIgniteEvent event) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
if (wcfg.blockLighter && cause == IgniteCause.FLINT_AND_STEEL) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
|
||||
*/
|
||||
if (wcfg.fireSpreadDisableToggle && isFireSpread) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
|
@ -140,7 +140,14 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
|
||||
ConfigurationManager cfg = plugin.getGlobalConfiguration();
|
||||
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) {
|
||||
Vector pt = toVector(block);
|
||||
RegionManager mgr = plugin.getGlobalRegionManager().get(world);
|
||||
@ -170,7 +177,8 @@ public void handleBlockRightClick(PlayerInteractEvent event) {
|
||||
}
|
||||
|
||||
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);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user