Fix many things

This commit is contained in:
2025-08-02 13:25:22 +02:00
parent 5e5bfedb52
commit 3d0e5fc28d
11 changed files with 34 additions and 24 deletions
@@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.script.lua.libs;
import com.google.gson.*;
import de.steamwar.bausystem.region.Region;
import de.steamwar.bausystem.region.RegionSystem;
import de.steamwar.core.Core;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.api.Disable;
@@ -74,7 +75,7 @@ public class StorageLib implements LuaLib, Enable, Disable {
jsonObject.keySet().forEach(key -> {
map.put(key, fromJson(jsonObject.get(key)));
});
Region region = Region.getREGION_MAP().get(regionStorage.getName().substring(0, regionStorage.getName().length() - ".json".length()));
Region region = RegionSystem.INSTANCE.getRegion(regionStorage.getName().substring(0, regionStorage.getName().length() - ".json".length())).orElse(null);
REGION_STORAGE.put(region, map);
} catch (Exception e) {}
}