From d1e91a8adbe18aa5261dc358b7c128ba7823adda Mon Sep 17 00:00:00 2001
From: CraftBukkit/Spigot <noreply+git-craftbukkit@papermc.io>
Date: Wed, 11 Jul 2018 20:02:32 +1000
Subject: [PATCH] Player metadata really should be keyed by UUID not name

By: md_5 <git@md-5.net>
---
 .../org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java
index f4010b3a56..bac5c9e434 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java
@@ -10,7 +10,7 @@ import org.bukkit.metadata.MetadataStoreBase;
 public class PlayerMetadataStore extends MetadataStoreBase<OfflinePlayer> implements MetadataStore<OfflinePlayer> {
     /**
      * Generates a unique metadata key for {@link org.bukkit.entity.Player} and {@link OfflinePlayer} using the player
-     * name.
+     * UUID.
      * @see MetadataStoreBase#disambiguate(Object, String)
      * @param player the player
      * @param metadataKey The name identifying the metadata value
@@ -18,6 +18,6 @@ public class PlayerMetadataStore extends MetadataStoreBase<OfflinePlayer> implem
      */
     @Override
     protected String disambiguate(OfflinePlayer player, String metadataKey) {
-        return player.getName().toLowerCase(java.util.Locale.ENGLISH) + ":" + metadataKey;
+        return player.getUniqueId() + ":" + metadataKey;
     }
 }