From b5a8d2cf35e9460f3b91b8b2a2cbe3a0d8074657 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 28 Aug 2024 18:32:56 +1000 Subject: [PATCH] SPIGOT-7886: Fix mistake in AttributeModifier UUID shim By: md_5 --- .../src/main/java/org/bukkit/attribute/AttributeModifier.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/attribute/AttributeModifier.java b/paper-api/src/main/java/org/bukkit/attribute/AttributeModifier.java index d66502c9df..2a7ac892c2 100644 --- a/paper-api/src/main/java/org/bukkit/attribute/AttributeModifier.java +++ b/paper-api/src/main/java/org/bukkit/attribute/AttributeModifier.java @@ -1,6 +1,7 @@ package org.bukkit.attribute; import com.google.common.base.Preconditions; +import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Locale; import java.util.Map; @@ -65,7 +66,7 @@ public class AttributeModifier implements ConfigurationSerializable, Keyed { @NotNull @Deprecated public UUID getUniqueId() { - return UUID.fromString(getKey().toString()); + return UUID.nameUUIDFromBytes(getKey().toString().getBytes(StandardCharsets.UTF_8)); } @NotNull