mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-31 21:48:28 +01:00
Fix changed event for copper-fade flag
This commit is contained in:
parent
58fbb6f008
commit
5934e49489
@ -470,7 +470,6 @@ public void onLeavesDecay(LeavesDecayEvent event) {
|
||||
public void onBlockForm(BlockFormEvent event) {
|
||||
ConfigurationManager cfg = getConfig();
|
||||
|
||||
|
||||
if (cfg.activityHaltToggle) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
@ -521,6 +520,18 @@ public void onBlockForm(BlockFormEvent event) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (Materials.isUnwaxedCopper(event.getBlock().getType())) {
|
||||
if (wcfg.disableCopperBlockFade) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (wcfg.useRegions && !StateFlag.test(WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery()
|
||||
.queryState(BukkitAdapter.adapt(event.getBlock().getLocation()), (RegionAssociable) null, Flags.COPPER_FADE))) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@ -697,16 +708,6 @@ public void onBlockFade(BlockFadeEvent event) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
} else if (Materials.isUnwaxedCopper(event.getBlock().getType())) {
|
||||
if (wcfg.disableCopperBlockFade) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
if (wcfg.useRegions && !StateFlag.test(WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery()
|
||||
.queryState(BukkitAdapter.adapt(event.getBlock().getLocation()), (RegionAssociable) null, Flags.COPPER_FADE))) {
|
||||
event.setCancelled(true);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user