Skip to content
This repository was archived by the owner on Dec 31, 2024. It is now read-only.

Commit 9fe8a73

Browse files
committed
revert these being static by accident
1 parent 6bb8cef commit 9fe8a73

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/main/java/lol/hyper/bungeeblockversion/events/JoinEvent.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

src/main/java/lol/hyper/bungeeblockversion/tools/ConfigHandler.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,8 @@
3131

3232
public 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!");

0 commit comments

Comments
 (0)