Add pronouns auto-completion to tab completer
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7b3f0941e1
commit
791f95491d
@ -3,6 +3,7 @@ package wtf.beatrice.nounspicker.objects;
|
|||||||
import org.bukkit.command.Command;
|
import org.bukkit.command.Command;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.bukkit.util.StringUtil;
|
import org.bukkit.util.StringUtil;
|
||||||
|
import wtf.beatrice.nounspicker.utils.Cache;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -28,6 +29,11 @@ public class TabCompletion implements org.bukkit.command.TabCompleter
|
|||||||
if(args.length == 1)
|
if(args.length == 1)
|
||||||
{
|
{
|
||||||
StringUtil.copyPartialMatches(mainArg, mainSubCommands, completions);
|
StringUtil.copyPartialMatches(mainArg, mainSubCommands, completions);
|
||||||
|
} else if(args.length <= 3)
|
||||||
|
{
|
||||||
|
if(args[0].equalsIgnoreCase("set")) {
|
||||||
|
StringUtil.copyPartialMatches(args[args.length - 1].toLowerCase(), Cache.pronouns, completions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user