fix: make *cb {username{something{n}}} or similar work

This commit is contained in:
ChomeNS
2025-08-03 19:58:54 +07:00
parent c645c2ec9a
commit daabd8ea5a
2 changed files with 3 additions and 3 deletions

View File

@@ -1 +1 @@
3548
3550

View File

@@ -19,8 +19,8 @@ import java.util.regex.PatternSyntaxException;
// based off of HBot's supercb command
public class CommandBlockCommand extends Command {
private static final Pattern USER_PATTERN = Pattern.compile("\\{username\\{(.*?)}}");
private static final Pattern UUID_PATTERN = Pattern.compile("\\{uuid\\{(.*?)}}");
private static final Pattern USER_PATTERN = Pattern.compile("\\{username\\{([^{}]+(?:\\{[^{}]*}[^{}]*)*)}}");
private static final Pattern UUID_PATTERN = Pattern.compile("\\{uuid\\{([^{}]+(?:\\{[^{}]*}[^{}]*)*)}}");
public CommandBlockCommand () {
super(