Permalink
Browse files

Fix unregister_command()

  • Loading branch information...
PseudoKnight committed Aug 22, 2018
1 parent d1678aa commit 20de12845d1572da4c8ffd869b7b5d9c5cad6be9
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/java/com/laytonsmith/abstraction/bukkit/BukkitMCCommandMap.java
@@ -64,7 +64,7 @@ public boolean register(String label, String fallback, MCCommand cmd) {
@Override
public boolean unregister(MCCommand cmd) {
if(cmd.isRegistered()) {
((Map<String, Command>) ReflectionUtils.get(scm.getClass(), scm, "knownCommands")).remove(cmd.getName());
((Map<String, Command>) ReflectionUtils.invokeMethod(scm.getClass(), scm, "getKnownCommands")).remove(cmd.getName());
return cmd.unregister(this);
} else {
return false;

0 comments on commit 20de128

Please sign in to comment.