This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ParseResult parse2() throws CommandException { | |
ParseResult parseResult = new ParseResult(); | |
boolean inQuote = false; | |
// Regex Pattern for identifying arguments and flags. It respects quotation marks and escape characters. | |
Pattern pattern = Pattern.compile(regex); | |
// Check for unclosed quotes | |
{ | |
String toStrip = arguments; | |
while (true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ReadWriteLock getNewLock() { | |
if (FGConfigManager.getInstance().threadSafe()) { | |
return new ReentrantReadWriteLock(); | |
} else { | |
return new ReadWriteLock() { | |
private final Lock lock = new Lock() { | |
@Override | |
public void lock() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public Text getDetails(String arguments) { | |
TextBuilder builder = super.getDetails(arguments).builder(); | |
builder.append(Texts.of("\n")); | |
builder.append(Texts.of(TextColors.GREEN, | |
TextActions.suggestCommand("/foxguard modify handler " + this.name + " group members add "), | |
TextActions.showText(Texts.of("Click to Add a Player(s) to Members")), | |
"Members: ")); | |
try { | |
this.lock.readLock().lock(); |
NewerOlder