fix allay

This commit is contained in:
Zoe Gidiere 2024-10-25 16:28:00 -06:00
parent 2a40f4af1e
commit d91e531fa5

View File

@ -39,7 +39,8 @@ public class AllayPlatform extends AbstractPlatform {
public boolean reload() { public boolean reload() {
getTerraConfig().load(this); getTerraConfig().load(this);
getRawConfigRegistry().clear(); getRawConfigRegistry().clear();
boolean succeed = getRawConfigRegistry().loadAll(this); try {
getRawConfigRegistry().loadAll(this);
GENERATOR_WRAPPERS.forEach(wrapper -> { GENERATOR_WRAPPERS.forEach(wrapper -> {
getConfigRegistry().get(wrapper.getConfigPack().getRegistryKey()).ifPresent(pack -> { getConfigRegistry().get(wrapper.getConfigPack().getRegistryKey()).ifPresent(pack -> {
@ -51,7 +52,13 @@ public class AllayPlatform extends AbstractPlatform {
); );
}); });
}); });
return succeed; } catch(Exception e) {
TerraAllayPlugin.INSTANCE.getPluginLogger().error("Failed to reload Terra", e);
return false;
}
return true;
} }
@Override @Override