From 758f9cd5942fbf5befeee82a413c0917577bbf1a Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 5 May 2021 12:29:16 +0200 Subject: [PATCH] Fix PrototypeLoader and RegionLoader with version tag --- .../de/steamwar/bausystem/region/loader/PrototypeLoader.java | 2 +- .../src/de/steamwar/bausystem/region/loader/RegionLoader.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java b/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java index a8a0531c..199c2875 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/loader/PrototypeLoader.java @@ -44,7 +44,7 @@ public class PrototypeLoader { throw new SecurityException(e.getMessage(), e); } - int currentVersion = yapionObject.getPlainValue("@version"); + int currentVersion = yapionObject.getPlainValueOrDefault("@version", -1); if (currentVersion != loadedVersion && loadedVersion != 0) { throw new SecurityException("Version was not the specified version needed."); } diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java b/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java index 58f2689f..8d78cbf3 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/loader/RegionLoader.java @@ -57,7 +57,7 @@ public class RegionLoader { throw new SecurityException(e.getMessage(), e); } - int currentVersion = yapionObject.getPlainValue("@version"); + int currentVersion = yapionObject.getPlainValueOrDefault("@version", -1); if (currentVersion != loadedVersion && loadedVersion != 0) { throw new SecurityException("Version was not the specified version needed."); }