That is what happens when I copy paste

This commit is contained in:
Jaime Martinez Rincon 2017-02-18 11:21:46 +01:00
parent 26e8239fac
commit 183bb3c522
2 changed files with 11 additions and 8 deletions

View File

@ -53,8 +53,9 @@ public class FallbackCommand extends Command {
target = section.getParent();
}
if (ConfigEntries.RECONNECT_KICK_RESTRICTED.get()) {
if (ConfigEntries.FALLBACK_COMMAND_RESTRICTED.get()) {
if (section.getPosition() >= 0 && target.getPosition() < 0) {
msgr.send(ConfigEntries.UNAVAILABLE_MESSAGE.get());
return null;
}
}

View File

@ -86,7 +86,7 @@ public class ServerSection {
void load(LobbyBalancer plugin) {
if (parent != null && parent.parent == this) {
throw new IllegalStateException(String.format("The section \"%s\" and \"%s\" are parents of each other", this.name, parent.name));
throw new IllegalStateException(String.format("The sections \"%s\" and \"%s\" are parents of each other", this.name, parent.name));
}
if (section.contains("provider")) {
@ -149,13 +149,15 @@ public class ServerSection {
if (provider == null) {
ServerSection sect = this.parent;
while (sect.provider == null) {
sect = sect.parent;
}
if (sect != null) {
while (sect.provider == null) {
sect = sect.parent;
}
plugin.getLogger().info(String.format("The section \"%s\" inherits the provider from the section \"%s\"", this.name, sect.name));
provider = sect.provider;
inherited = true;
plugin.getLogger().info(String.format("The section \"%s\" inherits the provider from the section \"%s\"", this.name, sect.name));
provider = sect.provider;
inherited = true;
}
}
if (provider == null) {