3
0
Mirror von https://github.com/PaperMC/Velocity.git synchronisiert 2024-11-17 05:20:14 +01:00

Fixed missing forced-hosts not allowing Velocity to start

Dieser Commit ist enthalten in:
Adrian 2024-07-28 12:30:06 -05:00
Ursprung 51468530a9
Commit 7507789eb2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: FB8EF84DCE1BE452

Datei anzeigen

@ -186,8 +186,9 @@ public class VelocityConfiguration implements ProxyConfig {
valid = false; valid = false;
} }
} }
final Map<String, List<String>> configuredForcedHosts = forcedHosts.getForcedHosts();
for (Map.Entry<String, List<String>> entry : forcedHosts.getForcedHosts().entrySet()) { if (!configuredForcedHosts.isEmpty()) {
for (Map.Entry<String, List<String>> entry : configuredForcedHosts.entrySet()) {
if (entry.getValue().isEmpty()) { if (entry.getValue().isEmpty()) {
logger.error("Forced host '{}' does not contain any servers", entry.getKey()); logger.error("Forced host '{}' does not contain any servers", entry.getKey());
valid = false; valid = false;
@ -201,6 +202,7 @@ public class VelocityConfiguration implements ProxyConfig {
} }
} }
} }
}
try { try {
getMotd(); getMotd();
@ -638,11 +640,7 @@ public class VelocityConfiguration implements ProxyConfig {
private static class ForcedHosts { private static class ForcedHosts {
private Map<String, List<String>> forcedHosts = ImmutableMap.of( private Map<String, List<String>> forcedHosts = ImmutableMap.of();
"lobby.example.com", ImmutableList.of("lobby"),
"factions.example.com", ImmutableList.of("factions"),
"minigames.example.com", ImmutableList.of("minigames")
);
private ForcedHosts() { private ForcedHosts() {
} }