类 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().
-
字段概要
-
构造器概要
-
方法概要
修饰符和类型方法说明boolean
Attempts to convert the value of this metadata item into a boolean.byte
asByte()
Attempts to convert the value of this metadata item into a byte.double
asDouble()
Attempts to convert the value of this metadata item into a double.float
asFloat()
Attempts to convert the value of this metadata item into a float.int
asInt()
Attempts to convert the value of this metadata item into an int.long
asLong()
Attempts to convert the value of this metadata item into a long.short
asShort()
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 thePlugin
that 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
从接口复制的说明:MetadataValue
Returns thePlugin
that created this metadata item.- 指定者:
getOwningPlugin
在接口中MetadataValue
- 返回:
- the plugin that owns this metadata value. This should never be null.
-
asInt
public int asInt()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into an int.- 指定者:
asInt
在接口中MetadataValue
- 返回:
- the value as an int.
-
asFloat
public float asFloat()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a float.- 指定者:
asFloat
在接口中MetadataValue
- 返回:
- the value as a float.
-
asDouble
public double asDouble()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a double.- 指定者:
asDouble
在接口中MetadataValue
- 返回:
- the value as a double.
-
asLong
public long asLong()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a long.- 指定者:
asLong
在接口中MetadataValue
- 返回:
- the value as a long.
-
asShort
public short asShort()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a short.- 指定者:
asShort
在接口中MetadataValue
- 返回:
- the value as a short.
-
asByte
public byte asByte()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a byte.- 指定者:
asByte
在接口中MetadataValue
- 返回:
- the value as a byte.
-
asBoolean
public boolean asBoolean()从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a boolean.- 指定者:
asBoolean
在接口中MetadataValue
- 返回:
- the value as a boolean.
-
asString
从接口复制的说明:MetadataValue
Attempts to convert the value of this metadata item into a string.- 指定者:
asString
在接口中MetadataValue
- 返回:
- the value as a string.
-