mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2025-01-19 08:55:25 +01:00
Only show relevant commands
This commit is contained in:
parent
57f18eeb93
commit
fc72197f86
@ -65,10 +65,12 @@ public class MainCommand implements CommandExecutor, TabCompleter {
|
||||
public static List<SubCommand> getCommands(final SubCommand.CommandCategory category, final Player player) {
|
||||
final List<SubCommand> cmds = new ArrayList<>();
|
||||
for (final SubCommand c : subCommands) {
|
||||
if (!c.isPlayer || player != null) {
|
||||
if ((c.category.equals(category)) && c.permission.hasPermission(player)) {
|
||||
cmds.add(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
return cmds;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user