mirror of
https://github.com/YouHaveTrouble/CommandWhitelist.git
synced 2026-05-11 22:16:57 +00:00
add suggestions ignore already added
This commit is contained in:
@@ -10,7 +10,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class BungeeMainCommand extends Command implements TabExecutor {
|
||||
public class BungeeMainCommand extends Command implements TabExecutor {
|
||||
|
||||
public BungeeMainCommand(String name) {
|
||||
super(name);
|
||||
@@ -112,7 +112,13 @@ public class BungeeMainCommand extends Command implements TabExecutor {
|
||||
return list;
|
||||
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,10 @@ public class MainCommand implements TabExecutor {
|
||||
continue;
|
||||
}
|
||||
cmd = cmd.replace("/", "");
|
||||
|
||||
if (CommandWhitelist.getConfigCache().getPermList().get(args[1]).contains(cmd))
|
||||
continue;
|
||||
|
||||
if (cmd.startsWith(args[2])) {
|
||||
list.add(cmd);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user