From a5393b117aff4873c8fd12af92282d5e7d93906b Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 27 Jul 2019 20:01:02 -0700 Subject: [PATCH] Makes Blueprint Bundle uniqueIds case insensitive This actually makes them always lowercase in the code. The previous approach of using a case insensitive TreeMap was not possible because it could not handle null values, which could occur if the bundle had no blueprint set for a specific world environment. This approach was the easiest and most straightforward. The assumption here is that the admin was changing the unique name of the blueprint bundle in the JSON file. https://github.com/BentoBoxWorld/BentoBox/issues/865 --- .../bentobox/blueprints/dataobjects/BlueprintBundle.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/blueprints/dataobjects/BlueprintBundle.java b/src/main/java/world/bentobox/bentobox/blueprints/dataobjects/BlueprintBundle.java index ce7474653..19384d3fd 100644 --- a/src/main/java/world/bentobox/bentobox/blueprints/dataobjects/BlueprintBundle.java +++ b/src/main/java/world/bentobox/bentobox/blueprints/dataobjects/BlueprintBundle.java @@ -3,6 +3,7 @@ package world.bentobox.bentobox.blueprints.dataobjects; import java.util.ArrayList; import java.util.EnumMap; import java.util.List; +import java.util.Locale; import java.util.Map; import org.bukkit.Material; @@ -68,7 +69,7 @@ public class BlueprintBundle implements DataObject { */ @Override public String getUniqueId() { - return uniqueId; + return uniqueId.toLowerCase(Locale.ENGLISH); } /** * @param uniqueId the uniqueId to set