Package org.bukkit.metadata
Interface MetadataValue
- All Known Implementing Classes:
- FixedMetadataValue,- LazyMetadataValue,- MetadataValueAdapter
public interface MetadataValue
- 
Method SummaryModifier and TypeMethodDescriptionbooleanAttempts to convert the value of this metadata item into a boolean.byteasByte()Attempts to convert the value of this metadata item into a byte.doubleasDouble()Attempts to convert the value of this metadata item into a double.floatasFloat()Attempts to convert the value of this metadata item into a float.intasInt()Attempts to convert the value of this metadata item into an int.longasLong()Attempts to convert the value of this metadata item into a long.shortasShort()Attempts to convert the value of this metadata item into a short.asString()Attempts to convert the value of this metadata item into a string.Returns thePluginthat created this metadata item.voidInvalidates this metadata item, forcing it to recompute when next accessed.value()Fetches the value of this metadata item.
- 
Method Details- 
valueFetches the value of this metadata item.- Returns:
- the metadata value.
 
- 
asIntint asInt()Attempts to convert the value of this metadata item into an int.- Returns:
- the value as an int.
 
- 
asFloatfloat asFloat()Attempts to convert the value of this metadata item into a float.- Returns:
- the value as a float.
 
- 
asDoubledouble asDouble()Attempts to convert the value of this metadata item into a double.- Returns:
- the value as a double.
 
- 
asLonglong asLong()Attempts to convert the value of this metadata item into a long.- Returns:
- the value as a long.
 
- 
asShortshort asShort()Attempts to convert the value of this metadata item into a short.- Returns:
- the value as a short.
 
- 
asBytebyte asByte()Attempts to convert the value of this metadata item into a byte.- Returns:
- the value as a byte.
 
- 
asBooleanboolean asBoolean()Attempts to convert the value of this metadata item into a boolean.- Returns:
- the value as a boolean.
 
- 
asStringAttempts to convert the value of this metadata item into a string.- Returns:
- the value as a string.
 
- 
getOwningPluginReturns thePluginthat created this metadata item.- Returns:
- the plugin that owns this metadata value. Could be null if the plugin was already unloaded.
 
- 
invalidatevoid invalidate()Invalidates this metadata item, forcing it to recompute when next accessed.
 
-