mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-11-09 04:20:32 +01:00
Changed motds to descs
This commit is contained in:
parent
a3a760ef08
commit
33838af1c1
@ -17,7 +17,7 @@ public class ConfigEntries implements ConfigEntryHolder {
|
||||
public static final ConfigEntry<Integer> SERVER_CHECK_ATTEMPTS = new ConfigEntry<>(0, "settings.server_check.attempts", 5);
|
||||
public static final ConfigEntry<Integer> SERVER_CHECK_INTERVAL = new ConfigEntry<>(0, "settings.server_check.interval", 10000);
|
||||
public static final ConfigEntry<Boolean> SERVER_CHECK_PRINT_INFO = new ConfigEntry<>(0, "settings.server_check.print-info", false);
|
||||
public static final ConfigEntry<List<String>> SERVER_CHECK_MARKER_MOTDS = new ConfigEntry<>(0, "settings.server_check.marker-motds", Arrays.asList("Server is not accessible", "Gamemode has already started"));
|
||||
public static final ConfigEntry<List<String>> SERVER_CHECK_MARKER_DESCS = new ConfigEntry<>(0, "settings.server_check.marker-descs", Arrays.asList("Server is not accessible", "Gamemode has already started"));
|
||||
|
||||
public static final ConfigEntry<Boolean> GEOLOCATION_ENABLED = new ConfigEntry<>(0, "settings.geolocation.enabled", true);
|
||||
public static final ConfigEntry<Boolean> GEOLOCATION_PRINT_INFO = new ConfigEntry<>(0, "settings.geolocation.print-info", true);
|
||||
|
@ -13,10 +13,10 @@ import static me.jaimemartz.lobbybalancer.LobbyBalancer.printStartupInfo;
|
||||
|
||||
public class PingManager {
|
||||
private final LobbyBalancer plugin;
|
||||
private final Map<ServerInfo, ServerStatus> storage = new HashMap<>();
|
||||
private boolean stopped = true;
|
||||
private PingTacticType tactic;
|
||||
private ScheduledTask task;
|
||||
private final Map<ServerInfo, ServerStatus> storage = new HashMap<>();
|
||||
|
||||
public PingManager(LobbyBalancer plugin) {
|
||||
this.plugin = plugin;
|
||||
|
@ -13,8 +13,8 @@ public final class ServerStatus {
|
||||
this.maximum = maximum;
|
||||
boolean accessible = true;
|
||||
if (maximum != 0) {
|
||||
for (String pattern : ConfigEntries.SERVER_CHECK_MARKER_MOTDS.get()) {
|
||||
if (description.contains(pattern) || description.matches(pattern)) {
|
||||
for (String pattern : ConfigEntries.SERVER_CHECK_MARKER_DESCS.get()) {
|
||||
if (description.matches(pattern)) {
|
||||
accessible = false;
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ settings:
|
||||
print-info: false
|
||||
|
||||
# The descriptions that mark a server as non accessible
|
||||
marker-motds: ["Server is not accessible", "Gamemode has already started"]
|
||||
marker-descs: ["Server is not accessible", "Gamemode has already started"]
|
||||
|
||||
# This will connect the player to a server of the parent of the section the player is kicked from
|
||||
reconnect-kick:
|
||||
|
Loading…
Reference in New Issue
Block a user