Fix a always show helps for plugin command.

Former-commit-id: b798cf112e51c221d9765f3f879804f30ee46323 [formerly 8d58d2f23abfa6a63e77f0eb8252f0584fe3c5be]
Former-commit-id: 37afceeef2d7d549fe1369858d34453727db6cea
This commit is contained in:
Ghost_chu committed 2019-07-05 14:37:25 +08:00
1 parent 8635a84bcc
commit e7ace40d83
1 file changed
+5 -2
@@ -132,10 +132,13 @@ public class CommandManager implements TabCompleter, CommandExecutor {
for (CommandContainer container : cmds) {
if (container.getPrefix().equals(cmdArg[0].toLowerCase()))
if (container.getPermission() == null || container.getPermission().isEmpty() || sender.hasPermission(container
.getPermission()))
.getPermission())) {
container.getExecutor().onCommand(sender, commandLabel, passthroughArgs);
else
return true;
} else {
sender.sendMessage(MsgUtil.getMessage("no-permission"));
return true;
}
}
rootContainer.getExecutor().onCommand(sender, commandLabel, passthroughArgs);
return true;