mirror of
https://github.com/Multiverse/Multiverse-Core.git
synced 2024-11-25 12:05:14 +01:00
Fixed ordering causing some commands to be read over MVModify
This commit is contained in:
parent
0187a600b3
commit
8f56347572
@ -183,11 +183,13 @@ public class MultiverseCore extends JavaPlugin {
|
||||
this.commandManager.addCommand(new ConfirmCommand(this));
|
||||
this.commandManager.addCommand(new InfoCommand(this));
|
||||
this.commandManager.addCommand(new ReloadCommand(this));
|
||||
this.commandManager.addCommand(new ModifyCommand(this));
|
||||
|
||||
this.commandManager.addCommand(new ModifyAddCommand(this));
|
||||
this.commandManager.addCommand(new ModifySetCommand(this));
|
||||
this.commandManager.addCommand(new ModifyRemoveCommand(this));
|
||||
this.commandManager.addCommand(new ModifyClearCommand(this));
|
||||
// This modify MUST go last.
|
||||
this.commandManager.addCommand(new ModifyCommand(this));
|
||||
this.commandManager.addCommand(new EnvironmentCommand(this));
|
||||
this.commandManager.addCommand(new PurgeCommand(this));
|
||||
}
|
||||
|
@ -47,12 +47,11 @@ public abstract class BaseCommand {
|
||||
|
||||
String argsString = this.getArgsString(args);
|
||||
String lower = input.toLowerCase() + argsString;
|
||||
System.out.print("Trying to match Identifer: " + lower);
|
||||
int index = -1;
|
||||
int n = this.identifiers.size();
|
||||
for (int i = 0; i < n; i++) {
|
||||
String identifier = this.identifiers.get(i).toLowerCase();
|
||||
if (lower.matches(identifier + "(\\s+.*|\\s*)")) {
|
||||
if (index == -1 && lower.matches(identifier + "(\\s+.*|\\s*)")) {
|
||||
index = i;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user