Merge remote-tracking branch 'origin/version/7.0.x'

# Conflicts:
#	gradle.properties
This commit is contained in:
Joo200 2023-08-14 14:21:50 +02:00
commit 02a8fd4c17
4 changed files with 16 additions and 14 deletions

View File

@ -1,7 +1,7 @@
# Changelog
## 7.0.9
* Add support for MC 1.20
* Add support for MC 1.20, drop support for MC 1.19
* Made entities spawned via the `/summon` command get treated as plugin-spawned entities
* Add sniffer egg trample protection options

View File

@ -470,7 +470,6 @@ public class WorldGuardBlockListener extends AbstractListener {
public void onBlockForm(BlockFormEvent event) {
ConfigurationManager cfg = getConfig();
if (cfg.activityHaltToggle) {
event.setCancelled(true);
return;
@ -521,6 +520,18 @@ public class WorldGuardBlockListener extends AbstractListener {
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 class WorldGuardBlockListener extends AbstractListener {
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;
}
}
}

View File

@ -53,9 +53,10 @@ public final class Materials {
private static final Set<PotionEffectType> DAMAGE_EFFECTS = new HashSet<>();
private static void putMaterialTag(Tag<Material> tag, Integer value) {
if (tag == null) return;
tag.getValues().forEach(mat -> MATERIAL_FLAGS.put(mat, value));
}
private static Tag<Material> SIGNS_TAG;
private static Tag<Material> SIGNS_TAG = Tag.SIGNS;
static {
ENTITY_ITEMS.put(EntityType.PAINTING, Material.PAINTING);

View File

@ -3,4 +3,4 @@ main: com.sk89q.worldguard.bukkit.WorldGuardPlugin
version: "${internalVersion}"
depend: [WorldEdit]
softdepend: [CommandBook]
api-version: 1.19
api-version: "1.20"