This repository was archived by the owner on Dec 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/main/java/lol/hyper/bungeeblockversion Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,10 @@ public void onPreConnect(LoginEvent event) {
4242 return ;
4343 }
4444
45- if (ConfigHandler .versions .contains (event .getConnection ().getVersion ())) {
45+ if (bungeeBlockVersion . configHandler .versions .contains (event .getConnection ().getVersion ())) {
4646 event .setCancelled (true );
47- String blockedMessage = ConfigHandler .configuration .getString ("disconnect-message" );
48- String allowedVersions = VersionToStrings .allowedVersions (ConfigHandler .versions );
47+ String blockedMessage = bungeeBlockVersion . configHandler .configuration .getString ("disconnect-message" );
48+ String allowedVersions = VersionToStrings .allowedVersions (bungeeBlockVersion . configHandler .versions );
4949 if (allowedVersions == null ) {
5050 blockedMessage = "<red>All versions are currently blocked from playing.</red>" ;
5151 }
Original file line number Diff line number Diff line change 3131
3232public class ConfigHandler {
3333
34- public static final Integer CONFIG_VERSION = 4 ;
35- public static Configuration configuration ;
36- public static List <Integer > versions ;
34+ public Configuration configuration ;
35+ public List <Integer > versions ;
3736 private final BungeeBlockVersion bungeeBlockVersion ;
3837
3938 public ConfigHandler (BungeeBlockVersion bungeeBlockVersion ) {
@@ -60,6 +59,7 @@ public void loadConfig() {
6059 configuration =
6160 ConfigurationProvider .getProvider (YamlConfiguration .class ).load (configFile );
6261 versions = configuration .getIntList ("versions" );
62+ Integer CONFIG_VERSION = 4 ;
6363 if (configuration .getInt ("config-version" ) != CONFIG_VERSION ) {
6464 bungeeBlockVersion .logger .warning (
6565 "Your config is outdated. We will attempt to load your current config. However, things might not work!" );
You can’t perform that action at this time.
0 commit comments