Skip to content

Commit 02a8fd4

Browse files
committed
Merge remote-tracking branch 'origin/version/7.0.x'
# Conflicts: # gradle.properties
2 parents 8cbce96 + 3201cee commit 02a8fd4

File tree

4 files changed

+16
-14
lines changed

4 files changed

+16
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Changelog
22

33
## 7.0.9
4-
* Add support for MC 1.20
4+
* Add support for MC 1.20, drop support for MC 1.19
55
* Made entities spawned via the `/summon` command get treated as plugin-spawned entities
66
* Add sniffer egg trample protection options
77

worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/WorldGuardBlockListener.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,6 @@ public void onLeavesDecay(LeavesDecayEvent event) {
470470
public void onBlockForm(BlockFormEvent event) {
471471
ConfigurationManager cfg = getConfig();
472472

473-
474473
if (cfg.activityHaltToggle) {
475474
event.setCancelled(true);
476475
return;
@@ -521,6 +520,18 @@ public void onBlockForm(BlockFormEvent event) {
521520
return;
522521
}
523522
}
523+
524+
if (Materials.isUnwaxedCopper(event.getBlock().getType())) {
525+
if (wcfg.disableCopperBlockFade) {
526+
event.setCancelled(true);
527+
return;
528+
}
529+
if (wcfg.useRegions && !StateFlag.test(WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery()
530+
.queryState(BukkitAdapter.adapt(event.getBlock().getLocation()), (RegionAssociable) null, Flags.COPPER_FADE))) {
531+
event.setCancelled(true);
532+
return;
533+
}
534+
}
524535
}
525536

526537
/*
@@ -697,16 +708,6 @@ public void onBlockFade(BlockFadeEvent event) {
697708
event.setCancelled(true);
698709
return;
699710
}
700-
} else if (Materials.isUnwaxedCopper(event.getBlock().getType())) {
701-
if (wcfg.disableCopperBlockFade) {
702-
event.setCancelled(true);
703-
return;
704-
}
705-
if (wcfg.useRegions && !StateFlag.test(WorldGuard.getInstance().getPlatform().getRegionContainer().createQuery()
706-
.queryState(BukkitAdapter.adapt(event.getBlock().getLocation()), (RegionAssociable) null, Flags.COPPER_FADE))) {
707-
event.setCancelled(true);
708-
return;
709-
}
710711
}
711712
}
712713

worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/util/Materials.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ public final class Materials {
5353
private static final Set<PotionEffectType> DAMAGE_EFFECTS = new HashSet<>();
5454

5555
private static void putMaterialTag(Tag<Material> tag, Integer value) {
56+
if (tag == null) return;
5657
tag.getValues().forEach(mat -> MATERIAL_FLAGS.put(mat, value));
5758
}
58-
private static Tag<Material> SIGNS_TAG;
59+
private static Tag<Material> SIGNS_TAG = Tag.SIGNS;
5960

6061
static {
6162
ENTITY_ITEMS.put(EntityType.PAINTING, Material.PAINTING);

worldguard-bukkit/src/main/resources/plugin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ main: com.sk89q.worldguard.bukkit.WorldGuardPlugin
33
version: "${internalVersion}"
44
depend: [WorldEdit]
55
softdepend: [CommandBook]
6-
api-version: 1.19
6+
api-version: "1.20"

0 commit comments

Comments
 (0)