Little remark comments

This commit is contained in:
Jaime Martinez Rincon 2017-01-21 10:55:01 +01:00
parent bc38d8418d
commit abd71f66c6
2 changed files with 3 additions and 2 deletions

View File

@ -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";

View File

@ -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);