Skip to content

Commit 1fd5b38

Browse files
committed
Some things I have missed
1 parent 7d997cc commit 1fd5b38

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

src/main/java/me/jaimemartz/lobbybalancer/LobbyBalancer.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,13 @@
1919
import org.inventivetalent.update.bungee.BungeeUpdater;
2020

2121
import java.io.IOException;
22-
import java.util.concurrent.Callable;
2322
import java.util.logging.Level;
2423

2524
public class LobbyBalancer extends Plugin {
2625
public static final String USER_ID = "%%__USER__%%";
2726
public static final String RESOURCE_ID = "%%__RESOURCE__%%";
2827
public static final String NONCE_ID = "%%__NONCE__%%";
29-
private static final int LAST_VER_CONFIG_UPDATE = 20600;
28+
private static final int LAST_VER_CONFIG_UPDATE = 20950;
3029

3130
private boolean failed = false;
3231

@@ -50,7 +49,7 @@ public void onEnable() {
5049

5150
//Metrics (https://bstats.org/)
5251
Metrics metrics = new Metrics(this);
53-
metrics.addCustomChart(new Metrics.SingleLineChart("configred_sections", () -> sectionManager.getSections().size()));
52+
metrics.addCustomChart(new Metrics.SingleLineChart("configured_sections", () -> sectionManager.getSections().size()));
5453
}
5554

5655
private void enable() {
@@ -122,7 +121,10 @@ private void enable() {
122121
e.printStackTrace();
123122
}
124123
} else {
125-
getLogger().warning("The plugin is disabled, so nothing will work except the main command");
124+
getLogger().warning("-----------------------------------------------------");
125+
getLogger().warning("WARNING: This plugin is disabled, do not forget to set enabled on the config to true");
126+
getLogger().warning("Nothing is going to work until you do that, you can reload me by using the /balancer command");
127+
getLogger().warning("-----------------------------------------------------");
126128
}
127129
}
128130

src/main/java/me/jaimemartz/lobbybalancer/configuration/ConfigEntries.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ public class ConfigEntries implements ConfigEntryHolder {
4141
public static final ConfigEntry<Boolean> FALLBACK_PRINCIPAL_ENABLED = new ConfigEntry<>(0, "settings.fallback-principal", true);
4242
public static final ConfigEntry<Boolean> SERVERS_UPDATE = new ConfigEntry<>(0, "settings.servers-update", true);
4343

44-
public static final ConfigEntry<String> CONNECTING_MESSAGE = new ConfigEntry<>(0, "settings.messages.connecting", null);
45-
public static final ConfigEntry<String> FAILURE_MESSAGE = new ConfigEntry<>(0, "settings.messages.failure", null);
44+
public static final ConfigEntry<String> CONNECTING_MESSAGE = new ConfigEntry<>(0, "settings.messages.connecting-server", null);
45+
public static final ConfigEntry<String> FAILURE_MESSAGE = new ConfigEntry<>(0, "settings.messages.misc-failure", null);
4646
public static final ConfigEntry<String> UNKNOWN_SECTION_MESSAGE = new ConfigEntry<>(0, "settings.messages.unknown-section", null);
4747
public static final ConfigEntry<String> INVALID_INPUT_MESSAGE = new ConfigEntry<>(0, "settings.messages.invalid-input", null);
4848
public static final ConfigEntry<String> UNAVAILABLE_MESSAGE = new ConfigEntry<>(0, "settings.messages.unavailable-server", null);
49-
public static final ConfigEntry<String> KICK_MESSAGE = new ConfigEntry<>(0, "settings.messages.kick", null);
49+
public static final ConfigEntry<String> KICK_MESSAGE = new ConfigEntry<>(0, "settings.messages.player-kicked", null);
5050

5151
public static final ConfigEntry<String> CONFIG_VERSION = new ConfigEntry<>(0, "version", null);
5252
}

src/main/java/me/jaimemartz/lobbybalancer/section/ServerSection.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
import net.md_5.bungee.config.Configuration;
1010

1111
import java.net.InetSocketAddress;
12-
import java.util.*;
12+
import java.util.ArrayList;
13+
import java.util.List;
1314
import java.util.concurrent.Callable;
1415
import java.util.concurrent.atomic.AtomicBoolean;
1516
import java.util.regex.Matcher;

src/main/resources/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ settings:
110110

111111
# Comment a message to disable it
112112
messages:
113-
connecting: '&aConnecting to {server}'
114-
failure: '&cCould not find a server to get connected'
113+
connecting-server: '&aConnecting to {server}'
114+
misc-failure: '&cCould not find a server to get connected'
115115
unknown-section: '&cCould not find a section with that name'
116116
invalid-input: '&cThis is an invalid input type for this command'
117117
unavailable-server: '&cThis command cannot be executed on this server'
118-
kick: '&cYou have been kicked from &a{from} &cand you are being moved to &a{to}&c, reason: &a{reason}'
118+
player-kicked: '&cYou have been kicked from &a{from} &cand you are being moved to &a{to}&c, reason: &a{reason}'
119119

120120
# Here you have an example of what you can do with the sections
121121
# The plugin will print out info telling you if your config is right or not

0 commit comments

Comments
 (0)