mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-09-17 10:14:10 +02:00
Little remark comments
This commit is contained in:
parent
bc38d8418d
commit
abd71f66c6
@ -69,6 +69,7 @@ public enum PasteHelper {
|
||||
LOGS {
|
||||
@Override
|
||||
public String paste(Plugin plugin) throws Exception {
|
||||
//TODO Do not assume location and name of the latest log file
|
||||
File file = new File(plugin.getDataFolder().getParentFile().getParentFile(), "proxy.log.0");
|
||||
if (!file.exists()) {
|
||||
return "File does not exist";
|
||||
|
@ -53,7 +53,7 @@ public class ServerSection {
|
||||
throw new IllegalArgumentException(String.format("The section \"%s\" has an invalid parent set", name));
|
||||
}
|
||||
} else {
|
||||
//Principal sections do not necessarily must have a parent section
|
||||
//Principal sections do not necessarily must have a parent section, but might
|
||||
if (!principal) {
|
||||
throw new IllegalArgumentException(String.format("The section \"%s\" does not have a parent set", name));
|
||||
}
|
||||
@ -126,7 +126,7 @@ public class ServerSection {
|
||||
}
|
||||
|
||||
if (ConfigUtils.isSet(section, "section-server")) {
|
||||
int port = (int) Math.floor(Math.random() * (0xFFFF + 1));
|
||||
int port = (int) Math.floor(Math.random() * (0xFFFF + 1)); //Get a random valid port for our fake server
|
||||
server = plugin.getProxy().constructServerInfo("@" + section.getString("section-server"), new InetSocketAddress("0.0.0.0", port), String.format("Server of Section %s", name), false);
|
||||
plugin.getSectionManager().register(server, this);
|
||||
plugin.getProxy().getServers().put(server.getName(), server);
|
||||
|
Loading…
Reference in New Issue
Block a user