@@ -23,16 +23,16 @@ public class Config {
2323 public static boolean SETTINGS_DEBUG ;
2424
2525 //Basic settings
26- public static boolean BROADCAST_JOIN_MESSAGES ;
26+ public static boolean SETTINGS_BROADCAST_JOIN_MESSAGES ;
2727 public static boolean SETTINGS_BROADCAST_WIN_MESSAGES ;
28- public static boolean economy = true ;
29- public static boolean bossbar ;
30- public static int TRACKING_STICK_USES ;
31- public static int PLAYERS_FOR_TRACKING_STICK ;
28+ public static boolean HAS_ECONOMY = true ;
29+ public static boolean SETTINGS_BOSSBAR_COUNTDOWN ;
30+ public static int SETTINGS_TRACKING_STICK_USES ;
31+ public static int SETTINGS_PLAYERS_FOR_TRACKING_STICK ;
3232 public static int SETTINGS_TELEPORT_AT_END_TIME ;
3333 public static boolean SETTINGS_SAVE_PREVIOUS_LOCATION ;
3434 public static int SETTINGS_FREE_ROAM_TIME ;
35- public static Location GLOBAL_EXIT_LOCATION ;
35+ public static Location SETTINGS_GLOBAL_EXIT_LOCATION ;
3636
3737 // Scoreboard
3838 public static boolean SCOREBOARD_HIDE_NAMETAGS ;
@@ -49,8 +49,8 @@ public class Config {
4949 public static int MOBS_SPAWN_INTERVAL ;
5050 public static int MOBS_SPAWN_CAP_PER_PLAYER ;
5151
52- //Reward info
53- public static boolean REWARD_GIVE_REWARD ;
52+ // Reward info
53+ public static boolean REWARD_ENABLED ;
5454 public static int REWARD_CASH ;
5555 public static List <String > REWARD_COMMANDS ;
5656 public static List <String > REWARD_MESSAGES ;
@@ -93,8 +93,8 @@ public class Config {
9393
9494 //Spectate
9595 public static boolean SPECTATE_ENABLED ;
96- public static boolean spectateOnDeath ;
97- public static boolean SPECTATE_HIDE ;
96+ public static boolean SPECTATE_DEATH_TO_SPECTATE ;
97+ public static boolean SPECTATE_HIDE_HIDE_SPECTATORS ;
9898 public static boolean SPECTATE_FLY ;
9999 public static boolean SPECTATE_CHAT ;
100100
@@ -112,15 +112,15 @@ public Config(HungerGames plugin) {
112112 }
113113
114114 private void loadConfigFile () {
115- if (configFile == null ) {
116- configFile = new File (plugin .getDataFolder (), "config.yml" );
115+ if (this . configFile == null ) {
116+ this . configFile = new File (this . plugin .getDataFolder (), "config.yml" );
117117 }
118- if (!configFile .exists ()) {
119- plugin .saveResource ("config.yml" , false );
118+ if (!this . configFile .exists ()) {
119+ this . plugin .saveResource ("config.yml" , false );
120120 Util .log ("New config.yml <green>created" );
121121 }
122- config = YamlConfiguration .loadConfiguration (configFile );
123- matchConfig (config , configFile );
122+ this . config = YamlConfiguration .loadConfiguration (this . configFile );
123+ matchConfig (this . config , this . configFile );
124124 loadConfig ();
125125 Util .log ("config.yml <green>successfully loaded" );
126126 }
@@ -129,17 +129,17 @@ private void loadConfigFile() {
129129 private void loadConfig () {
130130 // Settings
131131 SETTINGS_DEBUG = config .getBoolean ("settings.debug" );
132- BROADCAST_JOIN_MESSAGES = config .getBoolean ("settings.broadcast-join-messages" );
132+ SETTINGS_BROADCAST_JOIN_MESSAGES = config .getBoolean ("settings.broadcast-join-messages" );
133133 SETTINGS_BROADCAST_WIN_MESSAGES = config .getBoolean ("settings.broadcast-win-messages" );
134- bossbar = config .getBoolean ("settings.bossbar-countdown" );
135- TRACKING_STICK_USES = config .getInt ("settings.trackingstick -uses" );
136- PLAYERS_FOR_TRACKING_STICK = config .getInt ("settings.players-for-trackingstick " );
134+ SETTINGS_BOSSBAR_COUNTDOWN = config .getBoolean ("settings.bossbar-countdown" );
135+ SETTINGS_TRACKING_STICK_USES = config .getInt ("settings.tracking-stick -uses" );
136+ SETTINGS_PLAYERS_FOR_TRACKING_STICK = config .getInt ("settings.players-for-tracking-stick " );
137137 SETTINGS_SAVE_PREVIOUS_LOCATION = config .getBoolean ("settings.save-previous-location" );
138138 SETTINGS_TELEPORT_AT_END_TIME = config .getInt ("settings.teleport-at-end-time" );
139139 SETTINGS_FREE_ROAM_TIME = config .getInt ("settings.free-room-time" );
140140 String locString = config .getString ("settings.global-exit-location" );
141141 if (locString != null && locString .contains (":" )) {
142- GLOBAL_EXIT_LOCATION = LocationParser .getLocFromString (locString );
142+ SETTINGS_GLOBAL_EXIT_LOCATION = LocationParser .getLocFromString (locString );
143143 }
144144
145145 // Scoreboard
@@ -157,12 +157,10 @@ private void loadConfig() {
157157 MOBS_SPAWN_INTERVAL = config .getInt ("mob-spawning.interval" ) * 20 ;
158158 MOBS_SPAWN_CAP_PER_PLAYER = config .getInt ("mob-spawning.cap-per-player" );
159159
160- REWARD_GIVE_REWARD = config .getBoolean ("reward.enabled" );
160+ REWARD_ENABLED = config .getBoolean ("reward.enabled" );
161161 REWARD_CASH = config .getInt ("reward.cash" );
162162 REWARD_COMMANDS = config .getStringList ("reward.commands" );
163163 REWARD_MESSAGES = config .getStringList ("reward.messages" );
164- REWARD_GIVE_REWARD = config .getBoolean ("reward.enabled" );
165- REWARD_CASH = config .getInt ("reward.cash" );
166164
167165 // Rollback
168166 ROLLBACK_ALLOW_BREAK_BLOCKS = config .getBoolean ("rollback.allow-block-break" );
@@ -194,8 +192,8 @@ private void loadConfig() {
194192 WORLD_BORDER_FINAL_SIZE = config .getInt ("world-border.final-border-size" );
195193
196194 SPECTATE_ENABLED = config .getBoolean ("spectate.enabled" );
197- spectateOnDeath = config .getBoolean ("spectate.death-to-spectate" );
198- SPECTATE_HIDE = config .getBoolean ("spectate.hide-spectators" );
195+ SPECTATE_DEATH_TO_SPECTATE = config .getBoolean ("spectate.death-to-spectate" );
196+ SPECTATE_HIDE_HIDE_SPECTATORS = config .getBoolean ("spectate.hide-spectators" );
199197 SPECTATE_FLY = config .getBoolean ("spectate.fly" );
200198 SPECTATE_CHAT = config .getBoolean ("spectate.chat" );
201199
@@ -208,14 +206,14 @@ private void loadConfig() {
208206 Util .log ("<red>Unable to setup vault!" );
209207 Util .log (" - <red>Economy provider is missing." );
210208 Util .log (" - <yellow>Cash rewards will not be given out.." );
211- REWARD_GIVE_REWARD = false ;
212- economy = false ;
209+ REWARD_ENABLED = false ;
210+ HAS_ECONOMY = false ;
213211 }
214212 } catch (NoClassDefFoundError e ) {
215213 Util .log ("<red>Unable to setup vault!" );
216214 Util .log (" - <yellow>Cash rewards will not be given out.." );
217- REWARD_GIVE_REWARD = false ;
218- economy = false ;
215+ REWARD_ENABLED = false ;
216+ HAS_ECONOMY = false ;
219217 }
220218 }
221219
0 commit comments