From d03be2018a1defd00c9bcee51fcac2da43d2f922 Mon Sep 17 00:00:00 2001 From: sovdee <10354869+sovdeeth@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:44:47 -0400 Subject: [PATCH 1/2] Allow some worlds to be filled in automatically --- .../skriptworldguard/elements/effects/EffCreateRegion.java | 2 +- .../skriptworldguard/elements/expressions/ExprRegionNamed.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/skriptlang/skriptworldguard/elements/effects/EffCreateRegion.java b/src/main/java/org/skriptlang/skriptworldguard/elements/effects/EffCreateRegion.java index e5a5766..e02c8fd 100644 --- a/src/main/java/org/skriptlang/skriptworldguard/elements/effects/EffCreateRegion.java +++ b/src/main/java/org/skriptlang/skriptworldguard/elements/effects/EffCreateRegion.java @@ -50,7 +50,7 @@ public class EffCreateRegion extends Effect { static { Skript.registerEffect(EffCreateRegion.class, - "create [a] [:temporary] global [worldguard] region [named] %string% in %world%", + "create [a] [:temporary] global [worldguard] region [named] %string% [in %world%]", "create [a] [:temporary] [cuboid|rectangular] [worldguard] region [named] %string% [in %-world%] (between|from) %location% (to|and) %location%", "create [a] [:temporary] polygonal [worldguard] region [named] %string% [in %-world%] with [a] min[imum] height of %number% and [a] max[imum] height of %number% with [the] points %locations%" ); diff --git a/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java b/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java index 521b15a..711d3ef 100644 --- a/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java +++ b/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java @@ -27,7 +27,8 @@ public class ExprRegionNamed extends SimpleExpression { static { Skript.registerExpression(ExprRegionNamed.class, WorldGuardRegion.class, ExpressionType.COMBINED, - "[the] [worldguard] region[s] [with [the] (name[s]|id[s])|named] %strings% (in|of) [[the] world] %world%" + "[the] [worldguard] region[s] [with [the] (name[s]|id[s])|named] %strings% (in|of) [[the] world] %world%", + "[the] [worldguard] region[s] [with [the] (name[s]|id[s])|named] %strings% [%world%]" ); } From 0146675434ffb7e6224b68eeabfe744c45406e80 Mon Sep 17 00:00:00 2001 From: sovdee <10354869+sovdeeth@users.noreply.github.com> Date: Tue, 15 Apr 2025 16:47:03 -0400 Subject: [PATCH 2/2] simpler pattern --- .../elements/expressions/ExprRegionNamed.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java b/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java index 711d3ef..6a62498 100644 --- a/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java +++ b/src/main/java/org/skriptlang/skriptworldguard/elements/expressions/ExprRegionNamed.java @@ -27,8 +27,9 @@ public class ExprRegionNamed extends SimpleExpression { static { Skript.registerExpression(ExprRegionNamed.class, WorldGuardRegion.class, ExpressionType.COMBINED, - "[the] [worldguard] region[s] [with [the] (name[s]|id[s])|named] %strings% (in|of) [[the] world] %world%", - "[the] [worldguard] region[s] [with [the] (name[s]|id[s])|named] %strings% [%world%]" + "[the] [worldguard] region[s] [named] %strings% [(in|of) [[the] world] %world%]", + "[the] [worldguard] region[s] with [the] (name[s]|id[s]) %strings% [(in|of) [[the] world] %world%]" + ); }