mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-04 23:47:59 +01:00
Fixed bug where Ops could not see admin help by default.
This commit is contained in:
parent
9920e31abb
commit
0b77225f06
@ -483,7 +483,7 @@ public abstract class CompositeCommand extends Command implements PluginIdentifi
|
|||||||
for (CompositeCommand subCommand: cmd.getSubCommands().values()) {
|
for (CompositeCommand subCommand: cmd.getSubCommands().values()) {
|
||||||
if (sender instanceof Player) {
|
if (sender instanceof Player) {
|
||||||
// Player
|
// Player
|
||||||
if (subCommand.getPermission().isEmpty() || sender.hasPermission(subCommand.getPermission())) {
|
if (subCommand.getPermission().isEmpty() || sender.hasPermission(subCommand.getPermission()) || sender.isOp()) {
|
||||||
// Permission is okay
|
// Permission is okay
|
||||||
options.add(subCommand.getLabel());
|
options.add(subCommand.getLabel());
|
||||||
}
|
}
|
||||||
|
@ -91,7 +91,7 @@ public class DefaultHelpCommand extends CompositeCommand {
|
|||||||
// Show the help
|
// Show the help
|
||||||
if (user.isPlayer()) {
|
if (user.isPlayer()) {
|
||||||
// Player. Check perms
|
// Player. Check perms
|
||||||
if (user.hasPermission(parent.getPermission())) {
|
if (user.isOp() || user.hasPermission(parent.getPermission())) {
|
||||||
user.sendMessage(HELP_SYNTAX_REF, USAGE_PLACEHOLDER, usage, PARAMS_PLACEHOLDER, params, DESC_PLACEHOLDER, desc);
|
user.sendMessage(HELP_SYNTAX_REF, USAGE_PLACEHOLDER, usage, PARAMS_PLACEHOLDER, params, DESC_PLACEHOLDER, desc);
|
||||||
} else {
|
} else {
|
||||||
// No permission, nothing to see here. If you don't have permission, you cannot see any sub commands
|
// No permission, nothing to see here. If you don't have permission, you cannot see any sub commands
|
||||||
|
Loading…
Reference in New Issue
Block a user