Skip to content

Commit

Permalink
Fix unregister_command()
Browse files Browse the repository at this point in the history
  • Loading branch information
PseudoKnight committed Aug 22, 2018
1 parent d1678aa commit 20de128
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -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;
Expand Down

0 comments on commit 20de128

Please sign in to comment.