mirror of
https://github.com/ME1312/SubServers-2.git
synced 2025-04-04 19:15:41 +02:00
Ignore servers not running in the confidence score
This commit is contained in:
parent
afa34f4993
commit
935a59bb34
@ -775,16 +775,12 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
for (String name : e.getPlayer().getPendingConnection().getListener().getServerPriority()) {
|
||||
if (!e.getKickedFrom().getName().equalsIgnoreCase(name)) {
|
||||
ServerInfo server = getServerInfo(name);
|
||||
if (server != null) {
|
||||
if (server != null && (!(server instanceof SubServer) || ((SubServer) server).isRunning())) {
|
||||
int confidence = 0;
|
||||
if (server instanceof Server) {
|
||||
if (!((Server) server).isHidden()) confidence++;
|
||||
if (!((Server) server).isRestricted()) confidence++;
|
||||
if (((Server) server).getSubData() != null) confidence++;
|
||||
|
||||
if (server instanceof SubServer) {
|
||||
if (!((SubServer) server).isRunning()) continue;
|
||||
}// else confidence += 0;
|
||||
}
|
||||
|
||||
if (next == null || confidence > next.name()) {
|
||||
|
@ -284,16 +284,12 @@ public final class SubPlugin extends BungeeCord implements Listener {
|
||||
for (String name : e.getPlayer().getPendingConnection().getListener().getServerPriority()) {
|
||||
if (!e.getKickedFrom().getName().equalsIgnoreCase(name)) {
|
||||
ServerInfo server = getServerInfo(name);
|
||||
if (server != null) {
|
||||
if (server != null && (!(server instanceof SubServerContainer) || ((SubServerContainer) server).isRunning())) {
|
||||
int confidence = 0;
|
||||
if (server instanceof ServerContainer) {
|
||||
if (!((ServerContainer) server).isHidden()) confidence++;
|
||||
if (!((ServerContainer) server).isRestricted()) confidence++;
|
||||
if (((ServerContainer) server).getSubData() != null) confidence++;
|
||||
|
||||
if (server instanceof SubServerContainer) {
|
||||
if (!((SubServerContainer) server).isRunning()) continue;
|
||||
}// else confidence += 0;
|
||||
}
|
||||
|
||||
if (next == null || confidence > next.name()) {
|
||||
|
Loading…
Reference in New Issue
Block a user