类 MetadataValueAdapter
java.lang.Object
org.bukkit.metadata.MetadataValueAdapter
- 所有已实现的接口:
MetadataValue
- 直接已知子类:
LazyMetadataValue
Optional base class for facilitating MetadataValue implementations.
This provides all the conversion functions for MetadataValue so that writing an implementation of MetadataValue is as simple as implementing value() and invalidate().
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明booleanAttempts 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.从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 org.bukkit.metadata.MetadataValue
invalidate, value
-
字段详细资料
-
owningPlugin
-
-
构造器详细资料
-
MetadataValueAdapter
-
-
方法详细资料
-
getOwningPlugin
从接口复制的说明:MetadataValueReturns thePluginthat created this metadata item.- 指定者:
getOwningPlugin在接口中MetadataValue- 返回:
- the plugin that owns this metadata value. Could be null if the plugin was already unloaded.
-
asInt
public int asInt()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into an int.- 指定者:
asInt在接口中MetadataValue- 返回:
- the value as an int.
-
asFloat
public float asFloat()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a float.- 指定者:
asFloat在接口中MetadataValue- 返回:
- the value as a float.
-
asDouble
public double asDouble()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a double.- 指定者:
asDouble在接口中MetadataValue- 返回:
- the value as a double.
-
asLong
public long asLong()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a long.- 指定者:
asLong在接口中MetadataValue- 返回:
- the value as a long.
-
asShort
public short asShort()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a short.- 指定者:
asShort在接口中MetadataValue- 返回:
- the value as a short.
-
asByte
public byte asByte()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a byte.- 指定者:
asByte在接口中MetadataValue- 返回:
- the value as a byte.
-
asBoolean
public boolean asBoolean()从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a boolean.- 指定者:
asBoolean在接口中MetadataValue- 返回:
- the value as a boolean.
-
asString
从接口复制的说明:MetadataValueAttempts to convert the value of this metadata item into a string.- 指定者:
asString在接口中MetadataValue- 返回:
- the value as a string.
-