mirror of
https://github.com/PaperMC/Velocity.git
synced 2026-02-17 06:27:42 +01:00
Fixed missing forced-hosts not allowing Velocity to start
This commit is contained in:
@@ -186,8 +186,9 @@ public class VelocityConfiguration implements ProxyConfig {
|
||||
valid = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (Map.Entry<String, List<String>> entry : forcedHosts.getForcedHosts().entrySet()) {
|
||||
final Map<String, List<String>> configuredForcedHosts = forcedHosts.getForcedHosts();
|
||||
if (!configuredForcedHosts.isEmpty()) {
|
||||
for (Map.Entry<String, List<String>> entry : configuredForcedHosts.entrySet()) {
|
||||
if (entry.getValue().isEmpty()) {
|
||||
logger.error("Forced host '{}' does not contain any servers", entry.getKey());
|
||||
valid = false;
|
||||
@@ -201,6 +202,7 @@ public class VelocityConfiguration implements ProxyConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
getMotd();
|
||||
@@ -638,11 +640,7 @@ public class VelocityConfiguration implements ProxyConfig {
|
||||
|
||||
private static class ForcedHosts {
|
||||
|
||||
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 Map<String, List<String>> forcedHosts = ImmutableMap.of();
|
||||
|
||||
private ForcedHosts() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user