Make messages fancier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Bea 2022-10-24 22:59:57 +02:00
parent f223b0a7c7
commit 5e94dace54
5 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,6 @@
package wtf.beatrice.nounspicker.commands.subcommands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.nounspicker.objects.Permission;
@ -21,7 +22,7 @@ public class NounsCreateSubCommand
if(args.length < 3)
{
sender.sendMessage("usage: /nouns create <pronoun> <format>");
sender.sendMessage(ChatColor.RED + "Usage: /nouns create <pronoun> <format>");
return true;
}

View File

@ -1,5 +1,6 @@
package wtf.beatrice.nounspicker.commands.subcommands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.nounspicker.objects.Permission;
@ -19,7 +20,7 @@ public class NounsDeleteSubCommand
}
if(args.length < 2) {
sender.sendMessage("usage: /nouns delete <pronoun>");
sender.sendMessage(ChatColor.RED + "Usage: /nouns delete <pronoun>");
return true;
}

View File

@ -1,5 +1,6 @@
package wtf.beatrice.nounspicker.commands.subcommands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.nounspicker.objects.Permission;
@ -20,7 +21,7 @@ public class NounsListSubCommand
return true;
}
sender.sendMessage("Pronouns List:");
sender.sendMessage(ChatColor.YELLOW + "Pronouns List:");
for(int i = 0; i < Cache.pronouns.size(); i++) {
String pronoun = Cache.pronouns.get(i);
int pronounId = Cache.dbManager.getPronounId(pronoun);

View File

@ -1,5 +1,6 @@
package wtf.beatrice.nounspicker.commands.subcommands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.nounspicker.objects.Permission;
@ -20,7 +21,7 @@ public class NounsSetSubCommand
if(args.length < 3)
{
sender.sendMessage("usage: /nouns set <main> <secondary>");
sender.sendMessage(ChatColor.RED + "Usage: /nouns set <main> <secondary>");
return true;
}
@ -29,13 +30,13 @@ public class NounsSetSubCommand
if(!Cache.dbManager.isPronounValid(mainPronoun))
{
sender.sendMessage("Invalid main pronoun!");
sender.sendMessage(ChatColor.RED + "Main pronoun '" + mainPronoun + "' not recognized!");
return true;
}
if(!Cache.dbManager.isPronounValid(secondaryPronoun))
{
sender.sendMessage("Invalid secondary pronoun!");
sender.sendMessage(ChatColor.RED + "Secondary pronoun '" + secondaryPronoun + "' not recognized!");
return true;
}
@ -45,10 +46,11 @@ public class NounsSetSubCommand
mainPronoun = Cache.dbManager.getPronounFormat(Cache.dbManager.getPronounId(mainPronoun));
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;
} else {
sender.sendMessage("Error updating pronouns! Please contact an administrator.");
sender.sendMessage(ChatColor.RED + "Error updating pronouns! Please contact an administrator.");
return true;
}
}

View File

@ -1,5 +1,6 @@
package wtf.beatrice.nounspicker.commands.subcommands;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
import org.jetbrains.annotations.NotNull;
import wtf.beatrice.nounspicker.objects.Permission;
@ -21,7 +22,7 @@ public class NounsUpdateSubCmd
if (args.length < 3) {
sender.sendMessage("usage: /nouns update <pronoun> <format>");
sender.sendMessage(ChatColor.RED + "Usage: /nouns update <pronoun> <format>");
return true;
}