mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2025-01-06 16:37:37 +01:00
Fix * flags
This commit is contained in:
parent
5d2c81da84
commit
8bb958e2d3
@ -108,7 +108,7 @@ public class CommandManager {
|
|||||||
if (cmd.max() != -1 && context.argsLength() > cmd.max())
|
if (cmd.max() != -1 && context.argsLength() > cmd.max())
|
||||||
throw new CommandUsageException("Too many arguments.", getUsage(args, cmd));
|
throw new CommandUsageException("Too many arguments.", getUsage(args, cmd));
|
||||||
|
|
||||||
if (!context.getFlags().contains('*')) {
|
if (!cmd.flags().contains("*")) {
|
||||||
for (char flag : context.getFlags())
|
for (char flag : context.getFlags())
|
||||||
if (cmd.flags().indexOf(String.valueOf(flag)) == -1)
|
if (cmd.flags().indexOf(String.valueOf(flag)) == -1)
|
||||||
throw new CommandUsageException("Unknown flag: " + flag, getUsage(args, cmd));
|
throw new CommandUsageException("Unknown flag: " + flag, getUsage(args, cmd));
|
||||||
|
Loading…
Reference in New Issue
Block a user