39 lines
958 B
Java
39 lines
958 B
Java
package wtf.beatrice.nounspicker.commands.subcommands;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import wtf.beatrice.nounspicker.utils.Cache;
|
|
|
|
public class NounsSetSubCommand
|
|
{
|
|
public static boolean run(@NotNull CommandSender sender,
|
|
@NotNull String[] args)
|
|
{
|
|
|
|
if(args.length < 3)
|
|
{
|
|
sender.sendMessage("usage: /nouns set <main> <secondary>");
|
|
return true;
|
|
}
|
|
|
|
String mainPronoun = args[1].toLowerCase();
|
|
String secondaryPronoun = args[2].toLowerCase();
|
|
|
|
if(!Cache.isPronounValid(mainPronoun))
|
|
{
|
|
sender.sendMessage("Invalid main pronoun!");
|
|
return true;
|
|
}
|
|
|
|
if(!Cache.isPronounValid(secondaryPronoun))
|
|
{
|
|
sender.sendMessage("Invalid secondary pronoun!");
|
|
return true;
|
|
}
|
|
|
|
// todo: add to sqlite
|
|
|
|
return true;
|
|
}
|
|
}
|