Send help message on command not found

This commit is contained in:
gravitylow committed 2014-01-25 11:35:03 -05:00
1 parent 9154ef3370
commit bef1c8de6e
2 files changed
+4 -1

No files matched your search

@@ -373,7 +373,7 @@ public class Backend {
if (isInWater.contains(player.getName())) {
if (isInWaterCache.contains(player.getName())) {
if (player.getNearbyEntities(1, 1, 1).isEmpty()) {
boolean b = false;
boolean b;
if (!Utilities.sprintFly(player)) {
b = x > magic.XZ_SPEED_MAX_WATER || z > magic.XZ_SPEED_MAX_WATER;
} else {
@@ -57,8 +57,11 @@ public class CommandHandler implements CommandExecutor {
for (CommandBase base : commands) {
if (base.getCommand().equalsIgnoreCase(command)) {
base.run(cs, newArgs);
break;
}
}
// Command not found, send help
commands.get(0).run(cs, null);
} else {
// Send help
commands.get(0).run(cs, null);