From 71ae039e0506291e40ada3c0a1009ecb89011ce9 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Tue, 18 Feb 2014 21:47:03 -0500 Subject: [PATCH] [Bleeding] Plugin aliases should have higher priority than fallbacks. Fixes BUKKIT-5442 By: t00thpick1 --- .../src/main/java/org/bukkit/command/SimpleCommandMap.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java b/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java index 4bf79988e8..8681987f37 100644 --- a/paper-api/src/main/java/org/bukkit/command/SimpleCommandMap.java +++ b/paper-api/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; }