[Bleeding] Plugin aliases should have higher priority than fallbacks. Fixes BUKKIT-5442

By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
Bukkit/Spigot
2014-02-18 21:47:03 -05:00
parent de55549866
commit 71ae039e05

View File

@@ -131,8 +131,9 @@ public class SimpleCommandMap implements CommandMap {
* @return true if command was registered, false otherwise. * @return true if command was registered, false otherwise.
*/ */
private synchronized boolean register(String label, Command command, boolean isAlias) { private synchronized boolean register(String label, Command command, boolean isAlias) {
if (isAlias && knownCommands.containsKey(label)) { if ((command instanceof VanillaCommand || isAlias) && knownCommands.containsKey(label)) {
// Request is for an alias and it conflicts with a existing command or previous alias ignore it // Request is for an alias/fallback command and it conflicts with
// a existing command or previous alias ignore it
// Note: This will mean it gets removed from the commands list of active aliases // Note: This will mean it gets removed from the commands list of active aliases
return false; return false;
} }