This commit is contained in:
parent
f223b0a7c7
commit
5e94dace54
@ -1,5 +1,6 @@
|
|||||||
package wtf.beatrice.nounspicker.commands.subcommands;
|
package wtf.beatrice.nounspicker.commands.subcommands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import wtf.beatrice.nounspicker.objects.Permission;
|
import wtf.beatrice.nounspicker.objects.Permission;
|
||||||
@ -21,7 +22,7 @@ public class NounsCreateSubCommand
|
|||||||
|
|
||||||
if(args.length < 3)
|
if(args.length < 3)
|
||||||
{
|
{
|
||||||
sender.sendMessage("usage: /nouns create <pronoun> <format>");
|
sender.sendMessage(ChatColor.RED + "Usage: /nouns create <pronoun> <format>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package wtf.beatrice.nounspicker.commands.subcommands;
|
package wtf.beatrice.nounspicker.commands.subcommands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import wtf.beatrice.nounspicker.objects.Permission;
|
import wtf.beatrice.nounspicker.objects.Permission;
|
||||||
@ -19,7 +20,7 @@ public class NounsDeleteSubCommand
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(args.length < 2) {
|
if(args.length < 2) {
|
||||||
sender.sendMessage("usage: /nouns delete <pronoun>");
|
sender.sendMessage(ChatColor.RED + "Usage: /nouns delete <pronoun>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package wtf.beatrice.nounspicker.commands.subcommands;
|
package wtf.beatrice.nounspicker.commands.subcommands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import wtf.beatrice.nounspicker.objects.Permission;
|
import wtf.beatrice.nounspicker.objects.Permission;
|
||||||
@ -20,7 +21,7 @@ public class NounsListSubCommand
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
sender.sendMessage("Pronouns List:");
|
sender.sendMessage(ChatColor.YELLOW + "Pronouns List:");
|
||||||
for(int i = 0; i < Cache.pronouns.size(); i++) {
|
for(int i = 0; i < Cache.pronouns.size(); i++) {
|
||||||
String pronoun = Cache.pronouns.get(i);
|
String pronoun = Cache.pronouns.get(i);
|
||||||
int pronounId = Cache.dbManager.getPronounId(pronoun);
|
int pronounId = Cache.dbManager.getPronounId(pronoun);
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package wtf.beatrice.nounspicker.commands.subcommands;
|
package wtf.beatrice.nounspicker.commands.subcommands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import wtf.beatrice.nounspicker.objects.Permission;
|
import wtf.beatrice.nounspicker.objects.Permission;
|
||||||
@ -20,7 +21,7 @@ public class NounsSetSubCommand
|
|||||||
|
|
||||||
if(args.length < 3)
|
if(args.length < 3)
|
||||||
{
|
{
|
||||||
sender.sendMessage("usage: /nouns set <main> <secondary>");
|
sender.sendMessage(ChatColor.RED + "Usage: /nouns set <main> <secondary>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,13 +30,13 @@ public class NounsSetSubCommand
|
|||||||
|
|
||||||
if(!Cache.dbManager.isPronounValid(mainPronoun))
|
if(!Cache.dbManager.isPronounValid(mainPronoun))
|
||||||
{
|
{
|
||||||
sender.sendMessage("Invalid main pronoun!");
|
sender.sendMessage(ChatColor.RED + "Main pronoun '" + mainPronoun + "' not recognized!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!Cache.dbManager.isPronounValid(secondaryPronoun))
|
if(!Cache.dbManager.isPronounValid(secondaryPronoun))
|
||||||
{
|
{
|
||||||
sender.sendMessage("Invalid secondary pronoun!");
|
sender.sendMessage(ChatColor.RED + "Secondary pronoun '" + secondaryPronoun + "' not recognized!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,10 +46,11 @@ public class NounsSetSubCommand
|
|||||||
mainPronoun = Cache.dbManager.getPronounFormat(Cache.dbManager.getPronounId(mainPronoun));
|
mainPronoun = Cache.dbManager.getPronounFormat(Cache.dbManager.getPronounId(mainPronoun));
|
||||||
secondaryPronoun = Cache.dbManager.getPronounFormat(Cache.dbManager.getPronounId(secondaryPronoun));
|
secondaryPronoun = Cache.dbManager.getPronounFormat(Cache.dbManager.getPronounId(secondaryPronoun));
|
||||||
|
|
||||||
sender.sendMessage("Your pronouns have correctly been set to " + mainPronoun + "/" + secondaryPronoun + "!");
|
sender.sendMessage(ChatColor.YELLOW + "Your pronouns have correctly been set to " +
|
||||||
|
mainPronoun + ChatColor.YELLOW + "/" + secondaryPronoun + ChatColor.YELLOW + "!");
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
sender.sendMessage("Error updating pronouns! Please contact an administrator.");
|
sender.sendMessage(ChatColor.RED + "Error updating pronouns! Please contact an administrator.");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package wtf.beatrice.nounspicker.commands.subcommands;
|
package wtf.beatrice.nounspicker.commands.subcommands;
|
||||||
|
|
||||||
|
import org.bukkit.ChatColor;
|
||||||
import org.bukkit.command.CommandSender;
|
import org.bukkit.command.CommandSender;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import wtf.beatrice.nounspicker.objects.Permission;
|
import wtf.beatrice.nounspicker.objects.Permission;
|
||||||
@ -21,7 +22,7 @@ public class NounsUpdateSubCmd
|
|||||||
|
|
||||||
|
|
||||||
if (args.length < 3) {
|
if (args.length < 3) {
|
||||||
sender.sendMessage("usage: /nouns update <pronoun> <format>");
|
sender.sendMessage(ChatColor.RED + "Usage: /nouns update <pronoun> <format>");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user