Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-16 21:10:30 +01:00
Fixed missing forced-hosts not allowing Velocity to start
Dieser Commit ist enthalten in:
Ursprung
51468530a9
Commit
7507789eb2
@ -186,18 +186,20 @@ 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()) {
|
||||||
if (entry.getValue().isEmpty()) {
|
for (Map.Entry<String, List<String>> entry : configuredForcedHosts.entrySet()) {
|
||||||
logger.error("Forced host '{}' does not contain any servers", entry.getKey());
|
if (entry.getValue().isEmpty()) {
|
||||||
valid = false;
|
logger.error("Forced host '{}' does not contain any servers", entry.getKey());
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (String server : entry.getValue()) {
|
|
||||||
if (!servers.getServers().containsKey(server)) {
|
|
||||||
logger.error("Server '{}' for forced host '{}' does not exist", server, entry.getKey());
|
|
||||||
valid = false;
|
valid = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String server : entry.getValue()) {
|
||||||
|
if (!servers.getServers().containsKey(server)) {
|
||||||
|
logger.error("Server '{}' for forced host '{}' does not exist", server, entry.getKey());
|
||||||
|
valid = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -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() {
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren