diff --git a/src/main/java/cn/nukkit/command/Command.java b/src/main/java/cn/nukkit/command/Command.java index fbbd4954eb7..4fa618b27e5 100644 --- a/src/main/java/cn/nukkit/command/Command.java +++ b/src/main/java/cn/nukkit/command/Command.java @@ -211,7 +211,7 @@ public boolean unregister(CommandMap commandMap) { } public boolean allowChangesFrom(CommandMap commandMap) { - return commandMap != null && !commandMap.equals(this.commandMap); + return this.commandMap == null || this.commandMap.equals(commandMap); } public boolean isRegistered() { diff --git a/src/main/java/cn/nukkit/command/defaults/EffectCommand.java b/src/main/java/cn/nukkit/command/defaults/EffectCommand.java index f7b3f68b494..8b5877e0394 100644 --- a/src/main/java/cn/nukkit/command/defaults/EffectCommand.java +++ b/src/main/java/cn/nukkit/command/defaults/EffectCommand.java @@ -22,7 +22,7 @@ * Created by Snake1999 and Pub4Game on 2016/1/23. * Package cn.nukkit.command.defaults in project nukkit. */ -public class EffectCommand extends Command { +public class EffectCommand extends VanillaCommand { public EffectCommand(String name) { super(name, "%nukkit.command.effect.description", "%commands.effect.usage"); this.setPermission("nukkit.command.effect"); diff --git a/src/main/java/cn/nukkit/command/defaults/XpCommand.java b/src/main/java/cn/nukkit/command/defaults/XpCommand.java index 9ca01f11b92..1b5a9e407fc 100644 --- a/src/main/java/cn/nukkit/command/defaults/XpCommand.java +++ b/src/main/java/cn/nukkit/command/defaults/XpCommand.java @@ -12,7 +12,7 @@ * Created by Snake1999 on 2016/1/22. * Package cn.nukkit.command.defaults in project nukkit. */ -public class XpCommand extends Command { +public class XpCommand extends VanillaCommand { public XpCommand(String name) { super(name, "%nukkit.command.xp.description", "%commands.xp.usage"); this.setPermission("nukkit.command.xp");