mirror of
https://github.com/GeorgH93/Minepacks.git
synced 2025-02-15 01:31:45 +01:00
Add tab complete for debug command
This commit is contained in:
parent
8bbbc39d18
commit
a430846dfe
@ -49,7 +49,9 @@
|
||||
import java.io.*;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Files;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
|
||||
public class DebugCommand extends MinepacksCommand
|
||||
@ -202,6 +204,18 @@ else if (args.length == 2 && args[0].equals("size"))
|
||||
@Override
|
||||
public List<String> tabComplete(@NotNull CommandSender commandSender, @NotNull String mainCommandAlias, @NotNull String alias, @NotNull String[] args)
|
||||
{
|
||||
if (args.length == 1)
|
||||
{
|
||||
List<String> completeList = new ArrayList<>(2);
|
||||
if ("size".startsWith(args[0])) { completeList.add("size"); }
|
||||
if ("system".startsWith(args[0])) { completeList.add("system"); }
|
||||
if ("permissions".startsWith(args[0])) { completeList.add("permissions"); }
|
||||
return completeList;
|
||||
}
|
||||
else if (args.length == 2)
|
||||
{
|
||||
return Utils.getPlayerNamesStartingWith(args[args.length - 1], null);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user