mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Prevent NPE with new language overrides
This commit is contained in:
parent
5ab6952278
commit
4b4529c590
1 changed files with 4 additions and 2 deletions
|
@ -97,13 +97,15 @@ public class GeyserFabricMod implements ModInitializer, GeyserBootstrap {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEnable() {
|
public void onEnable() {
|
||||||
GeyserLocale.init(this);
|
|
||||||
|
|
||||||
dataFolder = FabricLoader.getInstance().getConfigDir().resolve("Geyser-Fabric");
|
dataFolder = FabricLoader.getInstance().getConfigDir().resolve("Geyser-Fabric");
|
||||||
if (!dataFolder.toFile().exists()) {
|
if (!dataFolder.toFile().exists()) {
|
||||||
//noinspection ResultOfMethodCallIgnored
|
//noinspection ResultOfMethodCallIgnored
|
||||||
dataFolder.toFile().mkdir();
|
dataFolder.toFile().mkdir();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Init dataFolder first as local language overrides call getConfigFolder()
|
||||||
|
GeyserLocale.init(this);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File configFile = FileUtils.fileOrCopiedFromResource(dataFolder.resolve("config.yml").toFile(), "config.yml",
|
File configFile = FileUtils.fileOrCopiedFromResource(dataFolder.resolve("config.yml").toFile(), "config.yml",
|
||||||
(x) -> x.replaceAll("generateduuid", UUID.randomUUID().toString()), this);
|
(x) -> x.replaceAll("generateduuid", UUID.randomUUID().toString()), this);
|
||||||
|
|
Loading…
Reference in a new issue