mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-11-05 02:19:48 +01:00
Fixed fallback command rules
This commit is contained in:
parent
fe2f7f22ce
commit
b06d0d5e7b
@ -6,7 +6,6 @@ import me.jaimemartz.lobbybalancer.configuration.ConfigEntries;
|
||||
import me.jaimemartz.lobbybalancer.connection.ConnectionIntent;
|
||||
import me.jaimemartz.lobbybalancer.manager.PlayerLocker;
|
||||
import me.jaimemartz.lobbybalancer.section.ServerSection;
|
||||
import me.jaimemartz.lobbybalancer.utils.ConfigUtils;
|
||||
import net.md_5.bungee.api.ChatColor;
|
||||
import net.md_5.bungee.api.CommandSender;
|
||||
import net.md_5.bungee.api.config.ServerInfo;
|
||||
@ -48,13 +47,14 @@ public class FallbackCommand extends Command {
|
||||
return target;
|
||||
} else {
|
||||
Configuration rules = plugin.getConfig().getSection("settings.fallback-command.rules");
|
||||
String bind = rules.getString(section.getName());
|
||||
ServerSection target = plugin.getSectionManager().getByName(bind);
|
||||
|
||||
if (ConfigUtils.isSet(rules, section.getName())) {
|
||||
String bind = rules.getString(section.getName());
|
||||
plugin.getSectionManager().getByName(bind);
|
||||
} else {
|
||||
return section.getParent();
|
||||
if (target == null) {
|
||||
target = section.getParent();
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
} else {
|
||||
if (ConfigEntries.FALLBACK_PRINCIPAL_ENABLED.get()) {
|
||||
|
Loading…
Reference in New Issue
Block a user