mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-11-09 04:20:32 +01:00
Some things I have missed
This commit is contained in:
parent
7d997ccfa7
commit
1fd5b38499
@ -19,14 +19,13 @@ import org.bstats.Metrics;
|
|||||||
import org.inventivetalent.update.bungee.BungeeUpdater;
|
import org.inventivetalent.update.bungee.BungeeUpdater;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class LobbyBalancer extends Plugin {
|
public class LobbyBalancer extends Plugin {
|
||||||
public static final String USER_ID = "%%__USER__%%";
|
public static final String USER_ID = "%%__USER__%%";
|
||||||
public static final String RESOURCE_ID = "%%__RESOURCE__%%";
|
public static final String RESOURCE_ID = "%%__RESOURCE__%%";
|
||||||
public static final String NONCE_ID = "%%__NONCE__%%";
|
public static final String NONCE_ID = "%%__NONCE__%%";
|
||||||
private static final int LAST_VER_CONFIG_UPDATE = 20600;
|
private static final int LAST_VER_CONFIG_UPDATE = 20950;
|
||||||
|
|
||||||
private boolean failed = false;
|
private boolean failed = false;
|
||||||
|
|
||||||
@ -50,7 +49,7 @@ public class LobbyBalancer extends Plugin {
|
|||||||
|
|
||||||
//Metrics (https://bstats.org/)
|
//Metrics (https://bstats.org/)
|
||||||
Metrics metrics = new Metrics(this);
|
Metrics metrics = new Metrics(this);
|
||||||
metrics.addCustomChart(new Metrics.SingleLineChart("configred_sections", () -> sectionManager.getSections().size()));
|
metrics.addCustomChart(new Metrics.SingleLineChart("configured_sections", () -> sectionManager.getSections().size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void enable() {
|
private void enable() {
|
||||||
@ -122,7 +121,10 @@ public class LobbyBalancer extends Plugin {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
getLogger().warning("The plugin is disabled, so nothing will work except the main command");
|
getLogger().warning("-----------------------------------------------------");
|
||||||
|
getLogger().warning("WARNING: This plugin is disabled, do not forget to set enabled on the config to true");
|
||||||
|
getLogger().warning("Nothing is going to work until you do that, you can reload me by using the /balancer command");
|
||||||
|
getLogger().warning("-----------------------------------------------------");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,12 +41,12 @@ public class ConfigEntries implements ConfigEntryHolder {
|
|||||||
public static final ConfigEntry<Boolean> FALLBACK_PRINCIPAL_ENABLED = new ConfigEntry<>(0, "settings.fallback-principal", true);
|
public static final ConfigEntry<Boolean> FALLBACK_PRINCIPAL_ENABLED = new ConfigEntry<>(0, "settings.fallback-principal", true);
|
||||||
public static final ConfigEntry<Boolean> SERVERS_UPDATE = new ConfigEntry<>(0, "settings.servers-update", true);
|
public static final ConfigEntry<Boolean> SERVERS_UPDATE = new ConfigEntry<>(0, "settings.servers-update", true);
|
||||||
|
|
||||||
public static final ConfigEntry<String> CONNECTING_MESSAGE = new ConfigEntry<>(0, "settings.messages.connecting", null);
|
public static final ConfigEntry<String> CONNECTING_MESSAGE = new ConfigEntry<>(0, "settings.messages.connecting-server", null);
|
||||||
public static final ConfigEntry<String> FAILURE_MESSAGE = new ConfigEntry<>(0, "settings.messages.failure", null);
|
public static final ConfigEntry<String> FAILURE_MESSAGE = new ConfigEntry<>(0, "settings.messages.misc-failure", null);
|
||||||
public static final ConfigEntry<String> UNKNOWN_SECTION_MESSAGE = new ConfigEntry<>(0, "settings.messages.unknown-section", null);
|
public static final ConfigEntry<String> UNKNOWN_SECTION_MESSAGE = new ConfigEntry<>(0, "settings.messages.unknown-section", null);
|
||||||
public static final ConfigEntry<String> INVALID_INPUT_MESSAGE = new ConfigEntry<>(0, "settings.messages.invalid-input", null);
|
public static final ConfigEntry<String> INVALID_INPUT_MESSAGE = new ConfigEntry<>(0, "settings.messages.invalid-input", null);
|
||||||
public static final ConfigEntry<String> UNAVAILABLE_MESSAGE = new ConfigEntry<>(0, "settings.messages.unavailable-server", null);
|
public static final ConfigEntry<String> UNAVAILABLE_MESSAGE = new ConfigEntry<>(0, "settings.messages.unavailable-server", null);
|
||||||
public static final ConfigEntry<String> KICK_MESSAGE = new ConfigEntry<>(0, "settings.messages.kick", null);
|
public static final ConfigEntry<String> KICK_MESSAGE = new ConfigEntry<>(0, "settings.messages.player-kicked", null);
|
||||||
|
|
||||||
public static final ConfigEntry<String> CONFIG_VERSION = new ConfigEntry<>(0, "version", null);
|
public static final ConfigEntry<String> CONFIG_VERSION = new ConfigEntry<>(0, "version", null);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,8 @@ import net.md_5.bungee.api.config.ServerInfo;
|
|||||||
import net.md_5.bungee.config.Configuration;
|
import net.md_5.bungee.config.Configuration;
|
||||||
|
|
||||||
import java.net.InetSocketAddress;
|
import java.net.InetSocketAddress;
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
import java.util.concurrent.atomic.AtomicBoolean;
|
import java.util.concurrent.atomic.AtomicBoolean;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
|
@ -110,12 +110,12 @@ settings:
|
|||||||
|
|
||||||
# Comment a message to disable it
|
# Comment a message to disable it
|
||||||
messages:
|
messages:
|
||||||
connecting: '&aConnecting to {server}'
|
connecting-server: '&aConnecting to {server}'
|
||||||
failure: '&cCould not find a server to get connected'
|
misc-failure: '&cCould not find a server to get connected'
|
||||||
unknown-section: '&cCould not find a section with that name'
|
unknown-section: '&cCould not find a section with that name'
|
||||||
invalid-input: '&cThis is an invalid input type for this command'
|
invalid-input: '&cThis is an invalid input type for this command'
|
||||||
unavailable-server: '&cThis command cannot be executed on this server'
|
unavailable-server: '&cThis command cannot be executed on this server'
|
||||||
kick: '&cYou have been kicked from &a{from} &cand you are being moved to &a{to}&c, reason: &a{reason}'
|
player-kicked: '&cYou have been kicked from &a{from} &cand you are being moved to &a{to}&c, reason: &a{reason}'
|
||||||
|
|
||||||
# Here you have an example of what you can do with the sections
|
# Here you have an example of what you can do with the sections
|
||||||
# The plugin will print out info telling you if your config is right or not
|
# The plugin will print out info telling you if your config is right or not
|
||||||
|
Loading…
Reference in New Issue
Block a user