mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-12 06:26:57 +00:00
add suggestions ignore already added
This commit is contained in:
@@ -112,7 +112,13 @@ public class BungeeMainCommand extends Command implements TabExecutor {
|
|||||||
return list;
|
return list;
|
||||||
|
|
||||||
for (Map.Entry<String, Command> command : CommandWhitelistBungee.getPlugin().getProxy().getPluginManager().getCommands()) {
|
for (Map.Entry<String, Command> command : CommandWhitelistBungee.getPlugin().getProxy().getPluginManager().getCommands()) {
|
||||||
if (!command.getKey().startsWith("/"))
|
if (command.getKey().startsWith("/"))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (CommandWhitelistBungee.getConfigCache().getPermList().get(args[1]).contains(command.getKey()))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (command.getKey().startsWith(args[2]))
|
||||||
list.add(command.getKey());
|
list.add(command.getKey());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,6 +127,10 @@ public class MainCommand implements TabExecutor {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cmd = cmd.replace("/", "");
|
cmd = cmd.replace("/", "");
|
||||||
|
|
||||||
|
if (CommandWhitelist.getConfigCache().getPermList().get(args[1]).contains(cmd))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (cmd.startsWith(args[2])) {
|
if (cmd.startsWith(args[2])) {
|
||||||
list.add(cmd);
|
list.add(cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user