mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fix commands being case sensitive.
This commit is contained in:
parent
d1ac355e58
commit
1ee13ff96c
2
pom.xml
2
pom.xml
@ -8,7 +8,7 @@
|
|||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>PlotSquared</artifactId>
|
<artifactId>PlotSquared</artifactId>
|
||||||
<version>3.2.18</version>
|
<version>3.2.19</version>
|
||||||
<name>PlotSquared</name>
|
<name>PlotSquared</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<build>
|
<build>
|
||||||
|
@ -333,7 +333,7 @@ public class MainCommand extends CommandManager<PlotPlayer> {
|
|||||||
}
|
}
|
||||||
Command<PlotPlayer> cmd;
|
Command<PlotPlayer> cmd;
|
||||||
if (label != null) {
|
if (label != null) {
|
||||||
cmd = getInstance().commands.get(label);
|
cmd = getInstance().commands.get(label.toLowerCase());
|
||||||
} else {
|
} else {
|
||||||
cmd = null;
|
cmd = null;
|
||||||
}
|
}
|
||||||
|
@ -120,19 +120,15 @@ public class FlagManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Flag getSettingFlag(final String world, final PlotSettings settings, final String id) {
|
public static Flag getSettingFlag(final String world, final PlotSettings settings, final String id) {
|
||||||
System.out.print("GETTIGN FLAG!! " + (settings.flags.size() == 0) + " | " + ((settings.flags.get(id)) == null));
|
|
||||||
Flag flag;
|
Flag flag;
|
||||||
if ((settings.flags.size() == 0) || ((flag = settings.flags.get(id)) == null)) {
|
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) {
|
if (plotworld == null) {
|
||||||
System.out.print("pw is nykl");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (plotworld.DEFAULT_FLAGS.size() == 0) {
|
if (plotworld.DEFAULT_FLAGS.size() == 0) {
|
||||||
System.out.print("no default flags");
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
System.out.print("DEFAULT_FLAGS: " + plotworld.DEFAULT_FLAGS + " | " + plotworld.DEFAULT_FLAGS.get(id));
|
|
||||||
return plotworld.DEFAULT_FLAGS.get(id);
|
return plotworld.DEFAULT_FLAGS.get(id);
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
|
@ -39,7 +39,7 @@ public class CommandManager<T extends CommandCaller> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
final public Command<T> getCommand(final String command) {
|
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) {
|
final public boolean createCommand(final Command<T> command) {
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user