summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2018-07-11 20:02:32 +1000
committermd_5 <git@md-5.net>2018-07-11 20:02:32 +1000
commit57ab4cfc6f4ff526d44319d9b8c79f6848db2de7 (patch)
tree243cbb5865930c9e373ba8b16f4a461e0b8f34c9 /src/main
parentca6d2cf9dc5b03193dfc77362d395cbe8b32eb4a (diff)
downloadcraftbukkit-57ab4cfc6f4ff526d44319d9b8c79f6848db2de7.tar
craftbukkit-57ab4cfc6f4ff526d44319d9b8c79f6848db2de7.tar.gz
craftbukkit-57ab4cfc6f4ff526d44319d9b8c79f6848db2de7.tar.lz
craftbukkit-57ab4cfc6f4ff526d44319d9b8c79f6848db2de7.tar.xz
craftbukkit-57ab4cfc6f4ff526d44319d9b8c79f6848db2de7.zip
Player metadata really should be keyed by UUID not name
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java b/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java
index f4010b3a..bac5c9e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/metadata/PlayerMetadataStore.java
+++ b/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;
}
}