mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-28 19:29:14 +00:00
Ensure metrics UUID is valid
This commit is contained in:
@@ -34,6 +34,7 @@ import org.spongepowered.configurate.yaml.YamlConfigurationLoader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.UUID;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import static org.spongepowered.configurate.NodePath.path;
|
||||
@@ -107,6 +108,13 @@ public final class ConfigLoader {
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.addAction(path("metrics", "uuid"), (path, value) -> {
|
||||
if ("generateduuid".equals(value.getString())) {
|
||||
// Manually copied config without Metrics UUID creation?
|
||||
return new Object[]{UUID.randomUUID()};
|
||||
}
|
||||
return null;
|
||||
})
|
||||
.addAction(path("bedrock", "motd1"), rename("primary-motd"))
|
||||
.addAction(path("bedrock", "motd2"), rename("secondary-motd"))
|
||||
// Legacy config values
|
||||
|
||||
Reference in New Issue
Block a user