org.bukkit.craftbukkit.metadata.EntityMetadataStore Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chest-server Show documentation
Show all versions of chest-server Show documentation
A spigot fork to kotlin structure and news.
The newest version!
package org.bukkit.craftbukkit.metadata;
import org.bukkit.entity.Entity;
import org.bukkit.metadata.MetadataStore;
import org.bukkit.metadata.MetadataStoreBase;
/**
* An EntityMetadataStore stores metadata values for all {@link Entity} classes an their descendants.
*/
public class EntityMetadataStore extends MetadataStoreBase implements MetadataStore {
/**
* Generates a unique metadata key for an {@link Entity} UUID.
*
* @param entity the entity
* @param metadataKey The name identifying the metadata value
* @return a unique metadata key
* @see MetadataStoreBase#disambiguate(Object, String)
*/
@Override
protected String disambiguate(Entity entity, String metadataKey) {
return entity.getUniqueId().toString() + ":" + metadataKey;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy