Some things I have missed

This commit is contained in:
Jaime Martinez Rincon 2017-04-21 15:58:54 +02:00
parent 7d997ccfa7
commit 1fd5b38499
4 changed files with 14 additions and 11 deletions

View File

@ -19,14 +19,13 @@ import org.bstats.Metrics;
import org.inventivetalent.update.bungee.BungeeUpdater;
import java.io.IOException;
import java.util.concurrent.Callable;
import java.util.logging.Level;
public class LobbyBalancer extends Plugin {
public static final String USER_ID = "%%__USER__%%";
public static final String RESOURCE_ID = "%%__RESOURCE__%%";
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;
@ -50,7 +49,7 @@ public class LobbyBalancer extends Plugin {
//Metrics (https://bstats.org/)
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() {
@ -122,7 +121,10 @@ public class LobbyBalancer extends Plugin {
e.printStackTrace();
}
} 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("-----------------------------------------------------");
}
}

View File

@ -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> 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> FAILURE_MESSAGE = new ConfigEntry<>(0, "settings.messages.failure", 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.misc-failure", 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> 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);
}

View File

@ -9,7 +9,8 @@ import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.config.Configuration;
import java.net.InetSocketAddress;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.regex.Matcher;

View File

@ -110,12 +110,12 @@ settings:
# Comment a message to disable it
messages:
connecting: '&aConnecting to {server}'
failure: '&cCould not find a server to get connected'
connecting-server: '&aConnecting to {server}'
misc-failure: '&cCould not find a server to get connected'
unknown-section: '&cCould not find a section with that name'
invalid-input: '&cThis is an invalid input type for this command'
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
# The plugin will print out info telling you if your config is right or not