Bukkit  1.4.7-R1.0
 All Classes Namespaces Files Functions Variables Enumerator Pages
org.bukkit.metadata.Metadatable Interface Reference

This interface is implemented by all objects that can provide metadata about themselves. More...

+ Inheritance diagram for org.bukkit.metadata.Metadatable:

Public Member Functions

void setMetadata (String metadataKey, MetadataValue newMetadataValue)
 Sets a metadata value in the implementing object's metadata store.
 
List< MetadataValuegetMetadata (String metadataKey)
 Returns a list of previously set metadata values from the implementing object's metadata store.
 
boolean hasMetadata (String metadataKey)
 Tests to see whether the implementing object contains the given metadata value in its metadata store.
 
void removeMetadata (String metadataKey, Plugin owningPlugin)
 Removes the given metadata value from the implementing object's metadata store.
 

Detailed Description

This interface is implemented by all objects that can provide metadata about themselves.

Definition at line 10 of file Metadatable.java.

Member Function Documentation

List<MetadataValue> org.bukkit.metadata.Metadatable.getMetadata ( String  metadataKey)

Returns a list of previously set metadata values from the implementing object's metadata store.

Parameters
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.Metadatable.hasMetadata ( String  metadataKey)

Tests to see whether the implementing object contains the given metadata value in its metadata store.

Parameters
metadataKeythe unique metadata key being queried.
Returns
the existence of the metadataKey within subject.
void org.bukkit.metadata.Metadatable.removeMetadata ( String  metadataKey,
Plugin  owningPlugin 
)

Removes the given metadata value from the implementing object's metadata store.

Parameters
metadataKeythe unique metadata key identifying the metadata to remove.
owningPluginThis plugin's metadata value will be removed. All other values will be left untouched.
Exceptions
IllegalArgumentExceptionIf plugin is null
void org.bukkit.metadata.Metadatable.setMetadata ( String  metadataKey,
MetadataValue  newMetadataValue 
)

Sets a metadata value in the implementing object's metadata store.

Parameters
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: