Skip to content

Commit

Permalink
Merge branch 'dev/feature' into fix/event-data-pollution
Browse files Browse the repository at this point in the history
  • Loading branch information
APickledWalrus authored Jan 5, 2024
2 parents bd22bb6 + 59caa86 commit 960b2ac
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/ch/njol/skript/lang/SkriptParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public SkriptParser(SkriptParser other, String expr) {
this(expr, other.flags, other.context);
}

public static final String WILDCARD = "[^\"]*?(?:\"[^\"]*?\"[^\"])*?";
public static final String WILDCARD = "[^\"]*?(?:\"[^\"]*?\"[^\"]*?)*?";

public static class ParseResult {
public Expression<?>[] exprs;
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/ch/njol/skript/lang/VariableString.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,11 @@ public static VariableString newInstance(String original, StringMode mode) {
log.printErrors("Can't understand this expression: " + original.substring(exprStart + 1, exprEnd));
return null;
} else {
if (!SkriptConfig.usePlayerUUIDsInVariableNames.value() && OfflinePlayer.class.isAssignableFrom(expr.getReturnType())) {
if (
mode == StringMode.VARIABLE_NAME &&
!SkriptConfig.usePlayerUUIDsInVariableNames.value() &&
OfflinePlayer.class.isAssignableFrom(expr.getReturnType())
) {
Skript.warning(
"In the future, players in variable names will use the player's UUID instead of their name. " +
"For information on how to make sure your scripts won't be impacted by this change, see https://github.com/SkriptLang/Skript/discussions/6270."
Expand Down
5 changes: 5 additions & 0 deletions src/test/skript/tests/syntaxes/structures/StructCommand.sk
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ command //somecommand [<text>]:
set {_arg1} to arg-1
if {_arg1} is set:
assert {_arg1} is "burrito is tasty" with "arg-1 is 'burrito is tasty' test failed (got '%{_arg1}%')"

# see https://github.com/SkriptLang/Skript/pull/6286
command /commandtest <string="player">:
trigger:
stop

0 comments on commit 960b2ac

Please sign in to comment.