You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/org/skriptlang/skriptworldguard/elements/effects/EffCreateRegion.java
+18-4Lines changed: 18 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,6 @@
3
3
importch.njol.skript.doc.Description;
4
4
importch.njol.skript.doc.Example;
5
5
importch.njol.skript.doc.Name;
6
-
importch.njol.skript.doc.RequiredPlugins;
7
6
importch.njol.skript.doc.Since;
8
7
importch.njol.skript.lang.Effect;
9
8
importch.njol.skript.lang.Expression;
@@ -38,7 +37,7 @@
38
37
" Then, with the provided heights, the shape is extended vertically to form the region." +
39
38
" At least three points must be provided to create a polygonal region.",
40
39
"Note that if you do not specify the world for a region, you must be sure that the locations provided all have the same world.",
41
-
"Note that Region IDs are only valid if they contain letters, numbers, underscores, commas, single quotation marks, dashes, pluses, or forward slashes.",
40
+
"Note that Region IDs are only valid if they contain letters, numbers, underscores, commas, single quotation marks, dashes, pluses, and forward slashes.",
42
41
"Note that if you attempt to create a region in a world where a region with the same ID already exists, that region will be replaced."
43
42
})
44
43
@Example("create a temporary global region named \"temporary_global_region\" in the player's world")
@@ -88,7 +87,12 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
88
87
@Override
89
88
protectedvoidexecute(Eventevent) {
90
89
Stringid = this.id.getSingle(event);
91
-
if (id == null || !ProtectedRegion.isValidId(id)) {
90
+
if (id == null) {
91
+
return;
92
+
}
93
+
if (!ProtectedRegion.isValidId(id)) {
94
+
error("'" + id + "' is an invalid region ID. Region IDs can only contain" +
95
+
" letters, numbers, underscores, commas, single quotation marks, dashes, pluses, and forward slashes");
0 commit comments