mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-11-09 04:20:32 +01:00
That is what happens when I copy paste
This commit is contained in:
parent
26e8239fac
commit
183bb3c522
@ -53,8 +53,9 @@ public class FallbackCommand extends Command {
|
|||||||
target = section.getParent();
|
target = section.getParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConfigEntries.RECONNECT_KICK_RESTRICTED.get()) {
|
if (ConfigEntries.FALLBACK_COMMAND_RESTRICTED.get()) {
|
||||||
if (section.getPosition() >= 0 && target.getPosition() < 0) {
|
if (section.getPosition() >= 0 && target.getPosition() < 0) {
|
||||||
|
msgr.send(ConfigEntries.UNAVAILABLE_MESSAGE.get());
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -86,7 +86,7 @@ public class ServerSection {
|
|||||||
|
|
||||||
void load(LobbyBalancer plugin) {
|
void load(LobbyBalancer plugin) {
|
||||||
if (parent != null && parent.parent == this) {
|
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")) {
|
if (section.contains("provider")) {
|
||||||
@ -149,13 +149,15 @@ public class ServerSection {
|
|||||||
|
|
||||||
if (provider == null) {
|
if (provider == null) {
|
||||||
ServerSection sect = this.parent;
|
ServerSection sect = this.parent;
|
||||||
while (sect.provider == null) {
|
if (sect != null) {
|
||||||
sect = sect.parent;
|
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));
|
plugin.getLogger().info(String.format("The section \"%s\" inherits the provider from the section \"%s\"", this.name, sect.name));
|
||||||
provider = sect.provider;
|
provider = sect.provider;
|
||||||
inherited = true;
|
inherited = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (provider == null) {
|
if (provider == null) {
|
||||||
|
Loading…
Reference in New Issue
Block a user