diff --git a/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiChatCommand.java b/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiChatCommand.java index dc60c83..e668fdb 100644 --- a/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiChatCommand.java +++ b/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiChatCommand.java @@ -61,7 +61,7 @@ public boolean onCommand(CommandSender sender, Command command, String s, String sender.sendMessage(ChatColor.AQUA + "If you still can't see emojis, make sure the settings for this server (on the server list) have the resource pack option set to prompt or enabled."); } return true; - case "load": + case "reload": if (!sender.hasPermission("emojichat.reload")) { sender.sendMessage(ChatColor.RED + "You need " + ChatColor.GOLD + "emojichat.reload" + ChatColor.RED + " to use this command."); return true; diff --git a/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiHandler.java b/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiHandler.java index 48711e3..ad05f8c 100644 --- a/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiHandler.java +++ b/plugin/src/main/java/io/github/radbuilder/emojichat/EmojiHandler.java @@ -119,8 +119,8 @@ private void loadShortcuts(FileConfiguration config) { */ private void loadDisabledEmojis(FileConfiguration config, EmojiChat plugin) { for (String disabledEmoji : config.getStringList("disabled-emojis")) { - if (disabledEmoji == null) { - plugin.getLogger().warning("Invalid emoji specified in 'disabled-emojis': " + disabledEmoji + ". Skipping..."); + if (disabledEmoji == null || !emojis.containsKey(disabledEmoji)) { + plugin.getLogger().warning("Invalid emoji specified in 'disabled-emojis': '" + disabledEmoji + "'. Skipping..."); continue; } disabledCharacters.add(emojis.remove(disabledEmoji)); // Remove disabled emojis from the emoji list @@ -483,7 +483,7 @@ void load(EmojiChat plugin) { if (!validateConfig(plugin.getConfig())) { // Make sure the config is valid plugin.getLogger().warning("Your config is invalid. No configuation data was loaded."); - plugin.getLogger().warning("Fix your config, then use /emojichat load"); + plugin.getLogger().warning("Fix your config, then use /emojichat reload"); plugin.getLogger().warning("If you're still running into issues after fixing your config, delete it and restart your server."); } else { // Config is valid, load config data loadShortcuts(plugin.getConfig()); // Loads all of the shortcuts specified in the config