Bukkit-API  1.7.9-R0.2
The inofficial Bukkit-API
org.bukkit.metadata.MetadataStore< T > Interface Template Reference

Public Member Functions

void setMetadata (T subject, String metadataKey, MetadataValue newMetadataValue)
 
List< MetadataValuegetMetadata (T subject, String metadataKey)
 
boolean hasMetadata (T subject, String metadataKey)
 
void removeMetadata (T subject, String metadataKey, Plugin owningPlugin)
 
void invalidateAll (Plugin owningPlugin)
 

Detailed Description

Definition at line 7 of file MetadataStore.java.

Member Function Documentation

List<MetadataValue> org.bukkit.metadata.MetadataStore< T >.getMetadata ( subject,
String  metadataKey 
)

Returns all metadata values attached to an object. If multiple plugins have attached metadata, each will value will be included.

Parameters
subjectthe object being interrogated.
metadataKeythe unique metadata key being sought.
Returns
A list of values, one for each plugin that has set the requested value.
boolean org.bukkit.metadata.MetadataStore< T >.hasMetadata ( subject,
String  metadataKey 
)

Tests to see if a metadata attribute has been set on an object.

Parameters
subjectthe object upon which the has-metadata test is performed.
metadataKeythe unique metadata key being queried.
Returns
the existence of the metadataKey within subject.
void org.bukkit.metadata.MetadataStore< T >.invalidateAll ( Plugin  owningPlugin)

Invalidates all metadata in the metadata store that originates from the given plugin. Doing this will force each invalidated metadata item to be recalculated the next time it is accessed.

Parameters
owningPluginthe plugin requesting the invalidation.
Exceptions
IllegalArgumentExceptionIf plugin is null
void org.bukkit.metadata.MetadataStore< T >.removeMetadata ( subject,
String  metadataKey,
Plugin  owningPlugin 
)

Removes a metadata item owned by a plugin from a subject.

Parameters
subjectthe object to remove the metadata from.
metadataKeythe unique metadata key identifying the metadata to remove.
owningPluginthe plugin attempting to remove a metadata item.
Exceptions
IllegalArgumentExceptionIf plugin is null
void org.bukkit.metadata.MetadataStore< T >.setMetadata ( subject,
String  metadataKey,
MetadataValue  newMetadataValue 
)

Adds a metadata value to an object.

Parameters
subjectThe object receiving the metadata.
metadataKeyA unique key to identify this metadata.
newMetadataValueThe metadata value to apply.
Exceptions
IllegalArgumentExceptionIf value is null, or the owning plugin is null

The documentation for this interface was generated from the following file: