From ec8d44ea7c6ddf410968c23b2015693f4dd4ce49 Mon Sep 17 00:00:00 2001 From: Alexander Degenhart Date: Thu, 17 Feb 2022 21:33:37 +0100 Subject: [PATCH] Fix loading of biome colorschemes --- DynmapCore/src/main/java/org/dynmap/ColorScheme.java | 2 +- DynmapCore/src/main/java/org/dynmap/common/BiomeMap.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/DynmapCore/src/main/java/org/dynmap/ColorScheme.java b/DynmapCore/src/main/java/org/dynmap/ColorScheme.java index 868902f5..cfbdc778 100644 --- a/DynmapCore/src/main/java/org/dynmap/ColorScheme.java +++ b/DynmapCore/src/main/java/org/dynmap/ColorScheme.java @@ -128,7 +128,7 @@ public class ColorScheme { id = -1; BiomeMap[] bm = BiomeMap.values(); for (int i = 0; i < bm.length; i++) { - if (bm[i].toString().equalsIgnoreCase(bio)) { + if (bm[i].getId().equalsIgnoreCase(bio)) { id = i; break; } else if (bio.equalsIgnoreCase("BIOME_" + i)) { diff --git a/DynmapCore/src/main/java/org/dynmap/common/BiomeMap.java b/DynmapCore/src/main/java/org/dynmap/common/BiomeMap.java index 7d838ed7..07d8b079 100644 --- a/DynmapCore/src/main/java/org/dynmap/common/BiomeMap.java +++ b/DynmapCore/src/main/java/org/dynmap/common/BiomeMap.java @@ -297,6 +297,9 @@ public class BiomeMap { public boolean isDefault() { return isDef; } + public String getId() { + return id; + } public String toString() { return String.format("%s(%s)", id, resourcelocation); }