diff --git a/src/main/java/org/bukkit/craftbukkit/metadata/EntityMetadataStore.java b/src/main/java/org/bukkit/craftbukkit/metadata/EntityMetadataStore.java index d592b9a531..35c484f46c 100644 --- a/src/main/java/org/bukkit/craftbukkit/metadata/EntityMetadataStore.java +++ b/src/main/java/org/bukkit/craftbukkit/metadata/EntityMetadataStore.java @@ -9,7 +9,8 @@ import org.bukkit.metadata.MetadataStoreBase; */ public class EntityMetadataStore extends MetadataStoreBase implements MetadataStore { /** - * Generates a unique metadata key for an {@link Entity} entity ID. + * Generates a unique metadata key for an {@link Entity} UUID. + * * @see MetadataStoreBase#disambiguate(Object, String) * @param entity the entity * @param metadataKey The name identifying the metadata value @@ -17,6 +18,6 @@ public class EntityMetadataStore extends MetadataStoreBase implements Me */ @Override protected String disambiguate(Entity entity, String metadataKey) { - return Integer.toString(entity.getEntityId()) + ":" + metadataKey; + return entity.getUniqueId().toString() + ":" + metadataKey; } }