mirror of
https://github.com/TotalFreedomMC/TF-ProjectKorra.git
synced 2024-09-11 04:39:32 +00:00
Fix help command
Stop help command from showing players commands they dont have permissions to use
This commit is contained in:
parent
3c893bbb8d
commit
111ecd8f66
|
@ -32,7 +32,7 @@ public class HelpCommand extends PKCommand {
|
|||
else if (args.size() == 0) {
|
||||
List<String> strings = new ArrayList<String>();
|
||||
for (PKCommand command : instances.values()) {
|
||||
if (!command.getName().equalsIgnoreCase("help")) {
|
||||
if (!command.getName().equalsIgnoreCase("help") && sender.hasPermission("bending.command." + command.getName())) {
|
||||
strings.add(command.getProperUse());
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class HelpCommand extends PKCommand {
|
|||
if (isNumeric(arg)) {
|
||||
List<String> strings = new ArrayList<String>();
|
||||
for (PKCommand command : instances.values()) {
|
||||
if (!command.getName().equalsIgnoreCase("help")) {
|
||||
if (!command.getName().equalsIgnoreCase("help") && sender.hasPermission("bending.command." + command.getName())) {
|
||||
strings.add(command.getProperUse());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue