From 9a8ec501b7a04a4dda493c042609b4938255cd6f Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Tue, 10 Jul 2018 08:22:37 +1000 Subject: [PATCH] Dont override commands --- .../sk89q/worldedit/util/command/SimpleDispatcher.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/com/sk89q/worldedit/util/command/SimpleDispatcher.java b/core/src/main/java/com/sk89q/worldedit/util/command/SimpleDispatcher.java index bc8644e5..80e68ad5 100644 --- a/core/src/main/java/com/sk89q/worldedit/util/command/SimpleDispatcher.java +++ b/core/src/main/java/com/sk89q/worldedit/util/command/SimpleDispatcher.java @@ -69,16 +69,13 @@ public class SimpleDispatcher implements Dispatcher { for (CommandMapping add : newDispatcher.getCommands()) { existingDispatcher.registerCommand(add.getCallable(), add.getAllAliases()); } + continue; } else { Fawe.debug("Replacing commands is currently undefined behavior: " + StringMan.getString(alias)); - return; + continue; } } - } - - for (String a : alias) { - String lower = a.toLowerCase(); - commands.put(lower, mapping); + commands.putIfAbsent(lower, mapping); } }