mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-06-27 11:14:43 +02:00
Fix commands being case sensitive.
This commit is contained in:
@ -333,7 +333,7 @@ public class MainCommand extends CommandManager<PlotPlayer> {
|
||||
System.arraycopy(parts, 2, args, 0, args.length);
|
||||
}
|
||||
Command<PlotPlayer> cmd;
|
||||
if (label != null) {
|
||||
if (label != null) {
|
||||
cmd = getInstance().commands.get(label.toLowerCase());
|
||||
} else {
|
||||
cmd = null;
|
||||
|
@ -120,19 +120,15 @@ public class FlagManager {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static Flag getSettingFlag(final String world, final PlotSettings settings, final String id) {
|
||||
Flag flag;
|
||||
if ((settings.flags.size() == 0) || ((flag = settings.flags.get(id)) == null)) {
|
||||
final PlotWorld plotworld = PS.get().getPlotWorld(world);
|
||||
final PlotWorld plotworld = PS.get().getPlotWorld(world);
|
||||
if (plotworld == null) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
if (plotworld.DEFAULT_FLAGS.size() == 0) {
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
return plotworld.DEFAULT_FLAGS.get(id);
|
||||
|
@ -39,7 +39,7 @@ public class CommandManager<T extends CommandCaller> {
|
||||
}
|
||||
|
||||
final public Command<T> getCommand(final String command) {
|
||||
return commands.get(command);
|
||||
return commands.get(command.toLowerCase());
|
||||
}
|
||||
|
||||
final public boolean createCommand(final Command<T> command) {
|
||||
|
Reference in New Issue
Block a user