diff --git a/BauSystem/build.gradle.kts b/BauSystem/build.gradle.kts index aeade561..df33b12e 100644 --- a/BauSystem/build.gradle.kts +++ b/BauSystem/build.gradle.kts @@ -50,5 +50,6 @@ tasks.register("DevBau21") { description = "Run a 1.21 Dev Bau" dependsOn(":SpigotCore:shadowJar") dependsOn(":BauSystem:shadowJar") + dependsOn(":SchematicSystem:shadowJar") template = "Bau21" } diff --git a/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java b/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java index 98d23ad3..5a5f62aa 100644 --- a/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java +++ b/CommonCore/SQL/src/de/steamwar/sql/YMLWrapper.java @@ -100,7 +100,15 @@ final class YMLWrapper { } public double getDouble(String path, double defaultValue) { - return get(path, defaultValue, Double.class::cast); + return get(path, defaultValue, o -> { + if (o instanceof Integer) { + return (Double) (double) (Integer) o; + } else if (o instanceof Double) { + return (Double) o; + } else { + throw new ClassCastException(o + " is not a double or integer"); + } + }); } public boolean getBoolean(String path, boolean defaultValue) {