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

Commit 21bfc9f

Browse files
committed
1.4.6
1 parent 42fad7a commit 21bfc9f

File tree

5 files changed

+8
-14
lines changed

5 files changed

+8
-14
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<groupId>lol.hyper</groupId>
2525
<artifactId>bungeeblockversion</artifactId>
26-
<version>1.4.5</version>
26+
<version>1.4.6</version>
2727
<packaging>jar</packaging>
2828

2929
<name>BungeeBlockVersion</name>

src/main/java/lol/hyper/bungeeblockversion/BungeeBlockVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void checkForUpdates() {
7878
}
7979

8080
public BungeeAudiences getAdventure() {
81-
if(this.adventure == null) {
81+
if (this.adventure == null) {
8282
throw new IllegalStateException("Tried to access Adventure when the plugin was disabled!");
8383
}
8484
return this.adventure;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ public void onPreConnect(LoginEvent event) {
6161
Component blockedMessageComponent = bungeeBlockVersion.miniMessage.deserialize(blockedMessage);
6262
BaseComponent blockedMessageBaseComponent = new TextComponent(BungeeComponentSerializer.get().serialize(blockedMessageComponent));
6363
event.setCancelReason(blockedMessageBaseComponent);
64-
bungeeBlockVersion.logger.info("Blocking player " + event.getConnection().getName() + " because they are playing on version "
65-
+ VersionToStrings.versionMap.get(event.getConnection().getVersion()) + " which is blocked!");
64+
bungeeBlockVersion.logger.info("Blocking player " + event.getConnection().getName() + " because they are playing on version " + VersionToStrings.versionMap.get(event.getConnection().getVersion()) + " which is blocked!");
6665
}
6766
}

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,12 @@ public void loadConfig() {
5858
}
5959
}
6060
try {
61-
configuration =
62-
ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile);
61+
configuration = ConfigurationProvider.getProvider(YamlConfiguration.class).load(configFile);
6362
blockedVersions = configuration.getIntList("versions");
6463
int CONFIG_VERSION = 5;
6564
if (configuration.getInt("config-version") != CONFIG_VERSION) {
66-
bungeeBlockVersion.logger.warning(
67-
"Your config is outdated. We will attempt to load your current config. However, things might not work!");
68-
bungeeBlockVersion.logger.warning(
69-
"To fix this, delete your current config and let the server remake it.");
65+
bungeeBlockVersion.logger.warning("Your config is outdated. We will attempt to load your current config. However, things might not work!");
66+
bungeeBlockVersion.logger.warning("To fix this, delete your current config and let the server remake it.");
7067
}
7168
if (blockedVersions.isEmpty()) {
7269
bungeeBlockVersion.logger.warning("There are no versions listed in the config! There will be no attempts to block connections.");
@@ -80,9 +77,7 @@ public void loadConfig() {
8077
while (iter.hasNext()) {
8178
int version = iter.next();
8279
if (!ProtocolConstants.SUPPORTED_VERSION_IDS.contains(version)) {
83-
bungeeBlockVersion.logger.warning(
84-
"Version " + version
85-
+ " is NOT a valid version number! Ignoring this version.");
80+
bungeeBlockVersion.logger.warning("Version " + version + " is NOT a valid version number! Ignoring this version.");
8681
iter.remove();
8782
}
8883
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public class VersionToStrings {
6868
versionMap.put(763, "1.20.1");
6969
versionMap.put(764, "1.20.2");
7070
}
71-
71+
7272
/**
7373
* Builds a string that will show what versions the server supports. Example: 1.8 to 1.14.4
7474
*

0 commit comments

Comments
 (0)