From 7a7dd7002e9643d062c7b0c23fc749db42761299 Mon Sep 17 00:00:00 2001 From: nossr50 Date: Wed, 13 Mar 2019 17:06:15 -0700 Subject: [PATCH] Hypens instead of Underscores because the serializer is a dumbo --- Changelog.txt | 4 ++-- .../com/gmail/nossr50/config/ConfigConstants.java | 3 +++ .../config/hocon/database/ConfigDatabase.java | 3 ++- .../hocon/database/ConfigSectionCleaning.java | 11 ++++++----- .../hocon/database/ConfigSectionDatabase.java | 4 ++-- .../database/ConfigSectionMaxConnections.java | 6 +++--- .../hocon/database/ConfigSectionMaxPoolSize.java | 6 +++--- .../config/hocon/database/ConfigSectionMySQL.java | 2 +- .../config/hocon/database/ConfigSectionUser.java | 4 ++-- .../hocon/database/UserConfigSectionServer.java | 10 +++++----- .../hocon/playerleveling/ConfigLeveling.java | 4 ++-- .../playerleveling/ConfigSectionLevelCaps.java | 9 +++------ .../ConfigSectionSkillLevelCap.java | 2 +- .../config/hocon/scoreboard/ConfigScoreboard.java | 5 +++-- .../scoreboard/ConfigSectionCooldownBoard.java | 6 +++--- .../hocon/scoreboard/ConfigSectionGeneral.java | 15 ++++++++------- .../scoreboard/ConfigSectionInspectBoard.java | 6 +++--- .../hocon/scoreboard/ConfigSectionRankBoard.java | 6 +++--- .../scoreboard/ConfigSectionScoreboardTypes.java | 13 +++++++------ .../hocon/scoreboard/ConfigSectionSkillBoard.java | 9 +++++---- .../hocon/scoreboard/ConfigSectionStatsBoard.java | 6 +++--- .../hocon/scoreboard/ConfigSectionTopBoard.java | 6 +++--- 22 files changed, 73 insertions(+), 67 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index da827e903..68dcb11d1 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -10,8 +10,8 @@ Key: Version 2.2.0 mcMMO's config system has been rewritten Many config files are now generated on demand instead of being copied from within the JAR - All config nodes that used to be styled with CamelCase now use underscores (_) as spaces for readability and consistency - All config nodes will now use Capital letters at the start of each nodes name and after each underscore (_) + All config nodes that used to be styled with CamelCase now use hyphens (-) as spaces for readability and consistency + All config nodes will now use Capital letters at the start of each nodes name and after each hyphen (-) All config nodes now include a comment with the default value of the node to use as reference Expanded settings relating to purging users who have not leveled or users who had not logged in for many months diff --git a/src/main/java/com/gmail/nossr50/config/ConfigConstants.java b/src/main/java/com/gmail/nossr50/config/ConfigConstants.java index a7498e18e..33d11f0be 100644 --- a/src/main/java/com/gmail/nossr50/config/ConfigConstants.java +++ b/src/main/java/com/gmail/nossr50/config/ConfigConstants.java @@ -8,6 +8,9 @@ import java.io.File; * Constants relating to config folders and paths */ public class ConfigConstants { + /* HOCON ESCAPE CHARACTER FOR UNDERSCORES */ + public static final String HOCON_FRIENDLY_UNDERSCORE = "\\_"; + /* FOLDER NAMES */ public static final String FOLDER_NAME_CONFIG = "config"; public static final String FOLDER_NAME_SKILLS = "skills"; diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigDatabase.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigDatabase.java index d6216de44..67a236146 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigDatabase.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigDatabase.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.config.hocon.database; +import com.gmail.nossr50.config.ConfigConstants; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @@ -10,7 +11,7 @@ public class ConfigDatabase { * CONFIG NODES */ - @Setting(value = "Database_Cleaning", + @Setting(value = "Database-Cleaning", comment = "Settings to automatically purge old users to keep database sizes small.") private ConfigSectionCleaning configSectionCleaning = new ConfigSectionCleaning(); diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionCleaning.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionCleaning.java index 2fb0721f4..271e24307 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionCleaning.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionCleaning.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.config.hocon.database; +import com.gmail.nossr50.config.ConfigConstants; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @@ -17,27 +18,27 @@ public class ConfigSectionCleaning { * CONFIG NODES */ - @Setting(value = "Purge_Old_Users", + @Setting(value = "Purge-Old-Users", comment = "Turn this on to enable automatic database pruning of old users." + "\nDefault value: "+PURGE_OLD_USERS) private boolean purgeOldUsers = PURGE_OLD_USERS; - @Setting(value = "Purge_Powerless_Users", comment = "Powerless users are players who have not" + + @Setting(value = "Purge-Powerless-Users", comment = "Powerless users are players who have not" + " leveled up in a single skill." + "\nDefault value: "+PURGE_POWERLESS_USERS) private boolean purgePowerlessUsers = PURGE_POWERLESS_USERS; - @Setting(value = "Only_Purge_At_Plugin_Startup", + @Setting(value = "Only-Purge-At-Plugin-Startup", comment = "If set to true, then purging will only happen when the plugin first loads." + "\nKeep in mind, this will trigger on reload as well." + "\nThis purge is on a 2 second delay from plugin start-up and runs in an ASYNC thread." + "\nDefault value: "+ONLY_PURGE_AT_STARTUP) private boolean onlyPurgeAtStartup = ONLY_PURGE_AT_STARTUP; - @Setting(value = "Purge_Interval_In_Hours", comment = "How many hours between automatic purging?") + @Setting(value = "Purge-Interval-In-Hours", comment = "How many hours between automatic purging?") private int purgeInterval = PURGE_INTERVAL_DEFAULT; - @Setting(value = "Old_User_Cutoff_In_Months", comment = "Users who haven't connected in this many months will be purged" + + @Setting(value = "Old-User-Cutoff-In-Months", comment = "Users who haven't connected in this many months will be purged" + "\nDefault value: "+OLD_USER_CUTOFF_IN_MONTHS) private int oldUserCutoffMonths = OLD_USER_CUTOFF_IN_MONTHS; diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionDatabase.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionDatabase.java index d3725f87d..868ac53d0 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionDatabase.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionDatabase.java @@ -10,10 +10,10 @@ public class ConfigSectionDatabase { * CONFIG NODES */ - @Setting(value = "Database_Name", comment = "The database name for your DB, this DB must already exist on the SQL server.") + @Setting(value = "Database-Name", comment = "The database name for your DB, this DB must already exist on the SQL server.") private String databaseName = "example_database_name"; - @Setting(value = "Table_Prefix", comment = "The Prefix that will be used for tables in your DB") + @Setting(value = "Table-Prefix", comment = "The Prefix that will be used for tables in your DB") private String tablePrefix = "mcmmo_"; /* diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxConnections.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxConnections.java index 93caefe43..e24b98a99 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxConnections.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxConnections.java @@ -15,13 +15,13 @@ public class ConfigSectionMaxConnections { * CONFIG NODES */ - @Setting(value = "Misc_Connection_Limit", comment = "Default value: "+MISC_DEFAULT) + @Setting(value = "Misc-Connection-Limit", comment = "Default value: "+MISC_DEFAULT) private int misc = 30; - @Setting(value = "Load_Connection_Limit", comment = "Default value: "+LOAD_DEFAULT) + @Setting(value = "Load-Connection-Limit", comment = "Default value: "+LOAD_DEFAULT) private int load = 30; - @Setting(value = "Save_Connection_Limit", comment = "Default value: "+SAVE_DEFAULT) + @Setting(value = "Save-Connection-Limit", comment = "Default value: "+SAVE_DEFAULT) private int save = 30; /* diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxPoolSize.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxPoolSize.java index 5679b9b30..487f4b5b6 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxPoolSize.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMaxPoolSize.java @@ -15,13 +15,13 @@ public class ConfigSectionMaxPoolSize { * CONFIG NODES */ - @Setting(value = "Misc_Pool", comment = "Default value: "+MISC_DEFAULT) + @Setting(value = "Misc-Pool", comment = "Default value: "+MISC_DEFAULT) private int misc = 10; - @Setting(value = "Load_Pool", comment = "Default value: "+LOAD_DEFAULT) + @Setting(value = "Load-Pool", comment = "Default value: "+LOAD_DEFAULT) private int load = 20; - @Setting(value = "Save_Pool", comment = "Default value: "+SAVE_DEFAULT) + @Setting(value = "Save-Pool", comment = "Default value: "+SAVE_DEFAULT) private int save = 20; /* diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMySQL.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMySQL.java index 2edfd5616..d74ef5ede 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMySQL.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionMySQL.java @@ -14,7 +14,7 @@ public class ConfigSectionMySQL { * CONFIG NODES */ - @Setting(value = "Use_MySQL", comment = "If set to true, mcMMO will use MySQL/MariaDB instead of FlatFile storage" + + @Setting(value = "Use-MySQL", comment = "If set to true, mcMMO will use MySQL/MariaDB instead of FlatFile storage" + "\nIt is highly recommended to use a MySQL/MariaDB server over FlatFile," + " especially if the number of players on your Minecraft server is fairly high." + "\nDefault value: "+USE_MYSQL_DEFAULT) diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionUser.java b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionUser.java index 3d48b8f61..de22adfcf 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionUser.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/ConfigSectionUser.java @@ -10,11 +10,11 @@ public class ConfigSectionUser { * CONFIG NODES */ - @Setting(value = "User_Name", comment = "The authorized user for your MySQL/MariaDB DB" + + @Setting(value = "User-Name", comment = "The authorized user for your MySQL/MariaDB DB" + "\nThis needs to be an existing user") private String username = "example_user_name"; - @Setting(value = "User_Password", comment = "The password for your authorized user") + @Setting(value = "User-Password", comment = "The password for your authorized user") private String password = "example_user_password"; /* diff --git a/src/main/java/com/gmail/nossr50/config/hocon/database/UserConfigSectionServer.java b/src/main/java/com/gmail/nossr50/config/hocon/database/UserConfigSectionServer.java index 3a36be805..3be9e3284 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/database/UserConfigSectionServer.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/database/UserConfigSectionServer.java @@ -15,27 +15,27 @@ public class UserConfigSectionServer { * CONFIG NODES */ - @Setting(value = "Use_SSL", comment = "Enables SSL for MySQL/MariaDB connections." + + @Setting(value = "Use-SSL", comment = "Enables SSL for MySQL/MariaDB connections." + "\nIf your SQL server supports SSL, it is recommended to have it on but not necessary." + "\nIf you run into any issues involving SSL, its best to just turn this off." + "\nDefault value: "+USE_SSL_DEFAULT) private boolean useSSL = USE_SSL_DEFAULT; - @Setting(value = "Server_Port", comment = "Your MySQL/MariaDB server port" + + @Setting(value = "Server-Port", comment = "Your MySQL/MariaDB server port" + "\nThe default port is typically 3306 for MySQL, but every server configuration is different!" + "\nDefault value: "+SERVER_PORT_DEFAULT) private int serverPort = SERVER_PORT_DEFAULT; - @Setting(value = "Server_Address", comment = "The address for your MySQL/MariaDB server" + + @Setting(value = "Server-Address", comment = "The address for your MySQL/MariaDB server" + "If the MySQL server is hosted on the same machine, you can use the localhost alias" + "\nDefault value: "+SERVER_ADDRESS_DEFAULT) private String serverAddress = SERVER_ADDRESS_DEFAULT; - @Setting(value = "Max_Connections", comment = "This setting is the max simultaneous MySQL/MariaDB connections allowed at a time." + + @Setting(value = "Max-Connections", comment = "This setting is the max simultaneous MySQL/MariaDB connections allowed at a time." + "\nThis needs to be high enough to support multiple player logins in quick succession, it is recommended that you do not lower these values") private ConfigSectionMaxConnections configSectionMaxConnections = new ConfigSectionMaxConnections(); - @Setting(value = "Max_Pool_Size", comment = "This setting is the max size of the pool of cached connections that we hold at any given time.") + @Setting(value = "Max-Pool-Size", comment = "This setting is the max size of the pool of cached connections that we hold at any given time.") private ConfigSectionMaxPoolSize configSectionMaxPoolSize = new ConfigSectionMaxPoolSize(); /* diff --git a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java index e8a3619b8..583524184 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigLeveling.java @@ -14,13 +14,13 @@ public class ConfigLeveling { * CONFIG NODES */ - @Setting(value = "Player_Starting_Level", + @Setting(value = "Player-Starting-Level", comment = "\nPlayers will start at this level in all skills if they aren't already saved in the database." + "\nHistorically this number has been 0, but this was changed in 2.1.X to 1 as I felt it was better to start from 1 than 0." + "\nDefault value: "+STARTING_LEVEL_DEFAULT) private int startingLevel = STARTING_LEVEL_DEFAULT; - @Setting(value = "Player_Level_Caps", + @Setting(value = "Player-Level-Caps", comment = "Restrict players from going above certain skill levels" + "\nPlayers that have skills above the limit will have their skill levels truncated down to the limit.") private ConfigSectionLevelCaps configSectionLevelCaps = new ConfigSectionLevelCaps(); diff --git a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionLevelCaps.java b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionLevelCaps.java index f7fdc8d30..5b81827b0 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionLevelCaps.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionLevelCaps.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.config.hocon.playerleveling; +import com.gmail.nossr50.config.ConfigConstants; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @@ -12,12 +13,12 @@ public class ConfigSectionLevelCaps { * CONFIG NODES */ - @Setting(value = "Reduce_Player_Skills_Above_Cap", + @Setting(value = "Reduce-Player-Skills-Above-Cap", comment = "Players with skills above the cap will have those skills reduced to the cap" + "\nDefault value: "+TRUNCATE_SKILLS_ABOVE_CAP_DEFAULT) private boolean truncateSkillsAboveCap = TRUNCATE_SKILLS_ABOVE_CAP_DEFAULT; - @Setting(value = "Power_Level", + @Setting(value = "Power-Level", comment = "Power Level is the sum of all of a players skills." + "\nEnable this cap if you want to force players into specializing into specific skills") private ConfigSectionSkillLevelCap powerLevel = new ConfigSectionSkillLevelCap(); @@ -29,10 +30,6 @@ public class ConfigSectionLevelCaps { * GETTER BOILERPLATE */ - public boolean isTruncateSkillsAboveCap() { - return truncateSkillsAboveCap; - } - public ConfigSectionSkillLevelCap getPowerLevel() { return powerLevel; } diff --git a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionSkillLevelCap.java b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionSkillLevelCap.java index 1a2880322..c7e3bfe6f 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionSkillLevelCap.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/playerleveling/ConfigSectionSkillLevelCap.java @@ -12,7 +12,7 @@ public class ConfigSectionSkillLevelCap { @Setting(value = "Enable") private boolean useLevelCap = USE_LEVEL_CAP_DEFAULT; - @Setting(value = "Level_Cap", comment = "Players will be unable to level past this value") + @Setting(value = "Level-Cap", comment = "Players will be unable to level past this value") private int levelCap = LEVEL_CAP_DEFAULT; public boolean isLevelCapEnabled() { diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigScoreboard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigScoreboard.java index 4cef4c52d..d664c2e4f 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigScoreboard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigScoreboard.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.config.hocon.scoreboard; +import com.gmail.nossr50.config.ConfigConstants; import com.gmail.nossr50.util.scoreboards.ScoreboardManager; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @@ -11,10 +12,10 @@ public class ConfigScoreboard { * CONFIG NODES */ - @Setting(value = "General Settings", comment = "Settings that apply to all scoreboards or don't fall into other categories") + @Setting(value = "General-Settings", comment = "Settings that apply to all scoreboards or don't fall into other categories") private ConfigSectionGeneral configSectionGeneral = new ConfigSectionGeneral(); - @Setting(value = "Scoreboard_Specific_Settings", comment = "Settings for individual scoreboard displays") + @Setting(value = "Scoreboard-Specific-Settings", comment = "Settings for individual scoreboard displays") private ConfigSectionScoreboardTypes configSectionScoreboardTypes = new ConfigSectionScoreboardTypes(); /* diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionCooldownBoard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionCooldownBoard.java index 6f3de0cf9..1ab96c3a9 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionCooldownBoard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionCooldownBoard.java @@ -15,21 +15,21 @@ public class ConfigSectionCooldownBoard { * CONFIG NODES */ - @Setting(value = "Show_Command_Output_In_Chat", + @Setting(value = "Show-Command-Output-In-Chat", comment = "Should the commands normal chat output be shown in chat?" + "\nIf you feel that the scoreboard does a good enough job at conveying the information, you can set this to false." + "\nIf you'd like to show the chat anyways, turn this to true, the scoreboard will still be shown if its enabled." + "\nDefault value: "+PRINT_TO_CHAT_DEFAULT) private boolean printToChat = PRINT_TO_CHAT_DEFAULT; - @Setting(value = "Show_Scoreboard", + @Setting(value = "Show-Scoreboard", comment = "Whether or not you wish to enable the display of this scoreboard." + "\nScoreboards are shown when the associated command is executed from the player." + "\nThis setting will only work if \"Use_Scoreboards\" is set to true, which is found elsewhere in this configuration file." + "\nDefault value: "+USE_THIS_SCOREBOARD_DEFAULT) private boolean useThisBoard = USE_THIS_SCOREBOARD_DEFAULT; - @Setting(value = "Display_Time_In_Seconds", + @Setting(value = "Display-Time-In-Seconds", comment = "How long to keep the scoreboard on a players screen after it is first shown." + "\nThis setting is not related to the command that keeps scoreboards on screen." + "\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT) diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionGeneral.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionGeneral.java index 285ffa510..dc589b00a 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionGeneral.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionGeneral.java @@ -19,14 +19,15 @@ public class ConfigSectionGeneral { * CONFIG NODES */ - @Setting(value = "Use_Scoreboards", comment = "Whether or not mcMMO should use make use of scoreboards." + + @Setting(value = "Use-Scoreboards", comment = "Whether or not mcMMO should make use of scoreboards." + "\nPersonally, I find scoreboards quite ugly, so I've disabled them by default." + "\nMost of their functionality has been replaced by the new XP bars (Boss Bars)" + - "\nIf you still wish to use scoreboards, you can, just turn this setting on." + + "\nIf you still wish to use scoreboards, you still can, just turn this setting on." + + "\nScoreboards can be used alongside XP bars, so don't worry about that!" + "\nDefault value: "+ USE_SCOREBOARDS_DEFAULT) private boolean useScoreboards = USE_SCOREBOARDS_DEFAULT; - @Setting(value = "Display_Power_Levels_Below_Player_Names", + @Setting(value = "Display-Power-Levels-Below-Player-Names", comment = "Whether or not Player power levels should be displayed below " + "their username (above their 3d model in the world)" + "\nAlthough it doesn't seem related to scoreboards, displaying a power level for a Player is done" + @@ -36,23 +37,23 @@ public class ConfigSectionGeneral { "\nDefault value: "+ POWER_LEVEL_DISPLAY_DEFAULT) private boolean powerLevelTags = POWER_LEVEL_DISPLAY_DEFAULT; - @Setting(value = "Show_Stats_Scoreboard_On_Player_Login", comment = "Shows the player the /mcstats scoreboard" + + @Setting(value = "Show-Stats-Scoreboard-On-Player-Login", comment = "Shows the player the /mcstats scoreboard" + " display after they login." + "\nDefault value: "+ SHOW_PLAYER_STATS_SCOREBOARD_AFTER_LOGIN_DEFAULT) private boolean showStatsAfterLogin = SHOW_PLAYER_STATS_SCOREBOARD_AFTER_LOGIN_DEFAULT; - @Setting(value = "Show_Scoreboard_Tips_Only_This_Many_Times", comment = "This determines how many times players are" + + @Setting(value = "Show-Scoreboard-Tips-Only-This-Many-Times", comment = "This determines how many times players are" + " given tips about how to use the scoreboard system before they are never tipped again." + "\nPlayers are given tips once per login session." + "\nDefault value: "+ SHOW_TIPS_LIMIT_DEFAULT) private int tipsAmount = SHOW_TIPS_LIMIT_DEFAULT; - @Setting(value ="Use_Rainbow_Styling_For_Skill_Names", comment = "If true, skills names will use rainbow style" + + @Setting(value ="Use-Rainbow-Styling-For-Skill-Names", comment = "If true, skills names will use rainbow style" + " colorings instead of having the same color" + "\nDefault value: "+ USE_RAINBOW_SKILL_COLORING_DEFAULT) private boolean useRainbows = USE_RAINBOW_SKILL_COLORING_DEFAULT; - @Setting(value = "Use_Super_Ability_Name_Instead_Of_Generic_Name", + @Setting(value = "Use-Super-Ability-Name-Instead-Of-Generic-Name", comment = "If true, scoreboards displaying super ability cooldowns will use the super abilities name " + "instead of using a generic word from the locale, which by default in the locale is defined as " + "\"Ability\". The locale key for this entry is - Scoreboard.Misc.Ability " + diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionInspectBoard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionInspectBoard.java index 7601b29db..dec3ff81d 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionInspectBoard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionInspectBoard.java @@ -15,21 +15,21 @@ public class ConfigSectionInspectBoard { * CONFIG NODES */ - @Setting(value = "Show_Command_Output_In_Chat", + @Setting(value = "Show-Command-Output-In-Chat", comment = "Should the commands normal chat output be shown in chat?" + "\nIf you feel that the scoreboard does a good enough job at conveying the information, you can set this to false." + "\nIf you'd like to show the chat anyways, turn this to true, the scoreboard will still be shown if its enabled." + "\nDefault value: "+PRINT_TO_CHAT_DEFAULT) private boolean printToChat = PRINT_TO_CHAT_DEFAULT; - @Setting(value = "Show_Scoreboard", + @Setting(value = "Show-Scoreboard", comment = "Whether or not you wish to enable the display of this scoreboard." + "\nScoreboards are shown when the associated command is executed from the player." + "\nThis setting will only work if \"Use_Scoreboards\" is set to true, which is found elsewhere in this configuration file." + "\nDefault value: "+USE_THIS_SCOREBOARD_DEFAULT) private boolean useThisBoard = USE_THIS_SCOREBOARD_DEFAULT; - @Setting(value = "Display_Time_In_Seconds", + @Setting(value = "Display-Time-In-Seconds", comment = "How long to keep the scoreboard on a players screen after it is first shown." + "\nThis setting is not related to the command that keeps scoreboards on screen." + "\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT) diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionRankBoard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionRankBoard.java index 905f7ec41..ec0372cc2 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionRankBoard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionRankBoard.java @@ -15,21 +15,21 @@ public class ConfigSectionRankBoard { * CONFIG NODES */ - @Setting(value = "Show_Command_Output_In_Chat", + @Setting(value = "Show-Command-Output-In-Chat", comment = "Should the commands normal chat output be shown in chat?" + "\nIf you feel that the scoreboard does a good enough job at conveying the information, you can set this to false." + "\nIf you'd like to show the chat anyways, turn this to true, the scoreboard will still be shown if its enabled." + "\nDefault value: "+PRINT_TO_CHAT_DEFAULT) private boolean printToChat = PRINT_TO_CHAT_DEFAULT; - @Setting(value = "Show_Scoreboard", + @Setting(value = "Show-Scoreboard", comment = "Whether or not you wish to enable the display of this scoreboard." + "\nScoreboards are shown when the associated command is executed from the player." + "\nThis setting will only work if \"Use_Scoreboards\" is set to true, which is found elsewhere in this configuration file." + "\nDefault value: "+USE_THIS_SCOREBOARD_DEFAULT) private boolean useThisBoard = USE_THIS_SCOREBOARD_DEFAULT; - @Setting(value = "Display_Time_In_Seconds", + @Setting(value = "Display-Time-In-Seconds", comment = "How long to keep the scoreboard on a players screen after it is first shown." + "\nThis setting is not related to the command that keeps scoreboards on screen." + "\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT) diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionScoreboardTypes.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionScoreboardTypes.java index 0c2629576..f7e4cf04e 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionScoreboardTypes.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionScoreboardTypes.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.config.hocon.scoreboard; +import com.gmail.nossr50.config.ConfigConstants; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @@ -10,22 +11,22 @@ public class ConfigSectionScoreboardTypes { * CONFIG NODES */ - @Setting(value = "Rank_Scoreboard", comment = "Settings for /mcrank Scoreboard") + @Setting(value = "Rank-Scoreboard", comment = "Settings for /mcrank Scoreboard") private ConfigSectionRankBoard configSectionRankBoard = new ConfigSectionRankBoard(); - @Setting(value = "Top_Scoreboard", comment = "Settings for /mctop Scoreboard") + @Setting(value = "Top-Scoreboard", comment = "Settings for /mctop Scoreboard") private ConfigSectionTopBoard configSectionTopBoard = new ConfigSectionTopBoard(); - @Setting(value = "Stats_Scoreboard", comment = "Settings for /mcstats Scoreboard") + @Setting(value = "Stats-Scoreboard", comment = "Settings for /mcstats Scoreboard") private ConfigSectionStatsBoard configSectionStatsBoard = new ConfigSectionStatsBoard(); - @Setting(value = "Inspect_Scoreboard", comment = "Settings for /inspect Scoreboard") + @Setting(value = "Inspect-Scoreboard", comment = "Settings for /inspect Scoreboard") private ConfigSectionInspectBoard configSectionInspectBoard = new ConfigSectionInspectBoard(); - @Setting(value = "Cooldown_Scoreboard", comment = "Settings for /mccooldown Scoreboard") + @Setting(value = "Cooldown-Scoreboard", comment = "Settings for /mccooldown Scoreboard") private ConfigSectionCooldownBoard configSectionCooldownBoard = new ConfigSectionCooldownBoard(); - @Setting(value = "Skill_Scoreboard_Settings", + @Setting(value = "Skill-Scoreboard-Settings", comment = "Settings for / (e.g. /mining, /unarmed)" + "\nNo \"print\" option is given here; the information will always be displayed in chat." + "\nThe functionality of this scoreboard overlaps heavily with the new XP bars," + diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionSkillBoard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionSkillBoard.java index 384c12002..43c151b09 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionSkillBoard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionSkillBoard.java @@ -1,5 +1,6 @@ package com.gmail.nossr50.config.hocon.scoreboard; +import com.gmail.nossr50.config.ConfigConstants; import ninja.leaping.configurate.objectmapping.Setting; import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable; @@ -16,7 +17,7 @@ public class ConfigSectionSkillBoard { * CONFIG NODES */ - @Setting(value = "Show_Scoreboard", + @Setting(value = "Show-Scoreboard", comment = "Whether or not you wish to enable the display of this scoreboard." + "\nScoreboards are shown when the associated command is executed from the player." + "\nThis setting will only work if \"Use_Scoreboards\" is set to true," + @@ -24,18 +25,18 @@ public class ConfigSectionSkillBoard { "\nDefault value: "+USE_THIS_SCOREBOARD_DEFAULT) private boolean useThisBoard = USE_THIS_SCOREBOARD_DEFAULT; - @Setting(value = "Display_Time_In_Seconds", + @Setting(value = "Display-Time-In-Seconds", comment = "How long to keep the scoreboard on a players screen after it is first shown." + "\nThis setting is not related to the command that keeps scoreboards on screen." + "\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT) private int displayTimeInSeconds = DISPLAY_TIME_SECONDS_DEFAULT; - @Setting(value = "Show_Board_On_Player_Level_Up", + @Setting(value = "Show-Board-On-Player-Level-Up", comment = "Show a skill scoreboard when the player levels up in that skill" + "\nDefault value: "+SHOW_BOARD_ON_PLAYER_LEVELUP) private boolean showBoardOnPlayerLevelUp = SHOW_BOARD_ON_PLAYER_LEVELUP; - @Setting(value = "Level_Up_Display_Time", comment = "How long to show a skill scoreboard when a player levels up?" + + @Setting(value = "Level-Up-Display-Time", comment = "How long to show a skill scoreboard when a player levels up?" + "\nIs only shown if Show_Board_On_Player_Level_Up is true" + "\nDefault value: "+SHOW_BOARD_ON_LEVELUP_TIME) private int showBoardOnPlayerLevelUpTime = SHOW_BOARD_ON_LEVELUP_TIME; diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionStatsBoard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionStatsBoard.java index 810c2fb4c..5bb1783cf 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionStatsBoard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionStatsBoard.java @@ -15,21 +15,21 @@ public class ConfigSectionStatsBoard { * CONFIG NODES */ - @Setting(value = "Show_Command_Output_In_Chat", + @Setting(value = "Show-Command-Output-In-Chat", comment = "Should the commands normal chat output be shown in chat?" + "\nIf you feel that the scoreboard does a good enough job at conveying the information, you can set this to false." + "\nIf you'd like to show the chat anyways, turn this to true, the scoreboard will still be shown if its enabled." + "\nDefault value: "+PRINT_TO_CHAT_DEFAULT) private boolean printToChat = PRINT_TO_CHAT_DEFAULT; - @Setting(value = "Show_Scoreboard", + @Setting(value = "Show-Scoreboard", comment = "Whether or not you wish to enable the display of this scoreboard." + "\nScoreboards are shown when the associated command is executed from the player." + "\nThis setting will only work if \"Use_Scoreboards\" is set to true, which is found elsewhere in this configuration file." + "\nDefault value: "+USE_THIS_SCOREBOARD_DEFAULT) private boolean useThisBoard = USE_THIS_SCOREBOARD_DEFAULT; - @Setting(value = "Display_Time_In_Seconds", + @Setting(value = "Display-Time-In-Seconds", comment = "How long to keep the scoreboard on a players screen after it is first shown." + "\nThis setting is not related to the command that keeps scoreboards on screen." + "\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT) diff --git a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionTopBoard.java b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionTopBoard.java index 6e6000439..6ae1a39fd 100644 --- a/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionTopBoard.java +++ b/src/main/java/com/gmail/nossr50/config/hocon/scoreboard/ConfigSectionTopBoard.java @@ -15,21 +15,21 @@ public class ConfigSectionTopBoard { * CONFIG NODES */ - @Setting(value = "Show_Command_Output_In_Chat", + @Setting(value = "Show-Command-Output-In-Chat", comment = "Should the commands normal chat output be shown in chat?" + "\nIf you feel that the scoreboard does a good enough job at conveying the information, you can set this to false." + "\nIf you'd like to show the chat anyways, turn this to true, the scoreboard will still be shown if its enabled." + "\nDefault value: "+PRINT_TO_CHAT_DEFAULT) private boolean printToChat = PRINT_TO_CHAT_DEFAULT; - @Setting(value = "Show_Scoreboard", + @Setting(value = "Show-Scoreboard", comment = "Whether or not you wish to enable the display of this scoreboard." + "\nScoreboards are shown when the associated command is executed from the player." + "\nThis setting will only work if \"Use_Scoreboards\" is set to true, which is found elsewhere in this configuration file." + "\nDefault value: "+USE_THIS_SCOREBOARD_DEFAULT) private boolean useThisBoard = USE_THIS_SCOREBOARD_DEFAULT; - @Setting(value = "Display_Time_In_Seconds", + @Setting(value = "Display-Time-In-Seconds", comment = "How long to keep the scoreboard on a players screen after it is first shown." + "\nThis setting is not related to the command that keeps scoreboards on screen." + "\nDefault value: "+DISPLAY_TIME_SECONDS_DEFAULT)