Moved default messages from main class to Messages class

This commit is contained in:
mfnalex 2018-08-13 13:44:08 +02:00
parent 45fc9be373
commit 1d85716207
2 changed files with 14 additions and 15 deletions

View File

@ -11,16 +11,20 @@ public class JeffChestSortMessages {
JeffChestSortMessages(JeffChestSortPlugin plugin) {
this.plugin = plugin;
MSG_ACTIVATED = ChatColor.translateAlternateColorCodes('&',
plugin.getConfig().getString("message-sorting-enabled"));
MSG_DEACTIVATED = ChatColor.translateAlternateColorCodes('&',
plugin.getConfig().getString("message-sorting-disabled"));
MSG_COMMANDMESSAGE = ChatColor.translateAlternateColorCodes('&',
plugin.getConfig().getString("message-when-using-chest"));
MSG_COMMANDMESSAGE2 = ChatColor.translateAlternateColorCodes('&',
plugin.getConfig().getString("message-when-using-chest2"));
MSG_PLAYERSONLY = ChatColor.translateAlternateColorCodes('&',
plugin.getConfig().getString("message-error-players-only"));
MSG_ACTIVATED = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
.getString("message-sorting-enabled", "&7Automatic chest sorting has been &aenabled&7.&r"));
MSG_DEACTIVATED = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
.getString("message-sorting-disabled", "&7Automatic chest sorting has been &cdisabled&7.&r"));
MSG_COMMANDMESSAGE = ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString(
"message-when-using-chest", "&7Hint: Type &6/chestsort&7 to enable automatic chest sorting."));
MSG_COMMANDMESSAGE2 = ChatColor.translateAlternateColorCodes('&', plugin.getConfig().getString(
"message-when-using-chest2", "&7Hint: Type &6/chestsort&7 to disable automatic chest sorting."));
MSG_PLAYERSONLY = ChatColor.translateAlternateColorCodes('&', plugin.getConfig()
.getString("message-error-players-only", "&cError: This command can only be run by players.&r"));
}
}

View File

@ -49,11 +49,6 @@ public class JeffChestSortPlugin extends JavaPlugin {
getConfig().addDefault("show-message-when-using-chest", true);
getConfig().addDefault("show-message-when-using-chest-and-sorting-is-enabled", false);
getConfig().addDefault("show-message-again-after-logout", true);
getConfig().addDefault("message-when-using-chest","&7Hint: Type &6/chestsort&7 to enable automatic chest sorting.");
getConfig().addDefault("message-when-using-chest2","&7Hint: Type &6/chestsort&7 to disable automatic chest sorting.");
getConfig().addDefault("message-sorting-disabled","&7Automatic chest sorting has been &cdisabled&7.&r");
getConfig().addDefault("message-sorting-enabled","&7Automatic chest sorting has been &aenabled&7.&r");
getConfig().addDefault("message-error-players-only","&cError: This command can only be run by players.&r");
}
void unregisterPlayer(Player p) {