From 71a5f8b83508e8d74323001285f9ab799423f8c8 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Tue, 18 Feb 2014 21:47:03 -0500 Subject: [Bleeding] Plugin aliases should have higher priority than fallbacks. Fixes BUKKIT-5442 --- src/main/java/org/bukkit/command/SimpleCommandMap.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java index 4bf79988..8681987f 100644 --- a/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java @@ -131,8 +131,9 @@ public class SimpleCommandMap implements CommandMap { * @return true if command was registered, false otherwise. */ private synchronized boolean register(String label, Command command, boolean isAlias) { - if (isAlias && knownCommands.containsKey(label)) { - // Request is for an alias and it conflicts with a existing command or previous alias ignore it + if ((command instanceof VanillaCommand || isAlias) && knownCommands.containsKey(label)) { + // 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 return false; } -- cgit v1.2.3