diff options
author | tahg <tahgtahv@gmail.com> | 2011-02-01 21:56:16 -0800 |
---|---|---|
committer | tahg <tahgtahv@gmail.com> | 2011-02-01 21:56:16 -0800 |
commit | 00d4e1a2e0c60226e28bf2f5fa7e4d7eff2bf4c2 (patch) | |
tree | dd4d4922524c844cb5a84c7112ca00e435b15f60 /src | |
parent | 01988e8f6b9bf0fc1936498de94e55bc525246a7 (diff) | |
download | bukkit-00d4e1a2e0c60226e28bf2f5fa7e4d7eff2bf4c2.tar bukkit-00d4e1a2e0c60226e28bf2f5fa7e4d7eff2bf4c2.tar.gz bukkit-00d4e1a2e0c60226e28bf2f5fa7e4d7eff2bf4c2.tar.lz bukkit-00d4e1a2e0c60226e28bf2f5fa7e4d7eff2bf4c2.tar.xz bukkit-00d4e1a2e0c60226e28bf2f5fa7e4d7eff2bf4c2.zip |
fallback code for command lookup
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/SimpleCommandMap.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java index 01452b69..21e1cfa9 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -74,6 +74,12 @@ public final class SimpleCommandMap implements CommandMap { boolean isRegisteredCommand = (target != null); if (isRegisteredCommand) { target.execute(sender, sentCommandLabel, args); + return true; + } + target = knownCommands.get(sentCommandLabel.substring(1)); + isRegisteredCommand = (target != null); + if (isRegisteredCommand) { + target.execute(sender, sentCommandLabel, args); } return isRegisteredCommand; } |