类 AttributeModifier
java.lang.Object
org.bukkit.attribute.AttributeModifier
- 所有已实现的接口:
ConfigurationSerializable
,Keyed
一个属性修饰符的具体实现.
-
嵌套类概要
-
构造器概要
构造器说明AttributeModifier
(@NotNull String name, double amount, @NotNull AttributeModifier.Operation operation) 已过时。AttributeModifier
(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull AttributeModifier.Operation operation) 已过时。AttributeModifier
(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull AttributeModifier.Operation operation, @NotNull EquipmentSlotGroup slot) 已过时。AttributeModifier
(@NotNull UUID uuid, @NotNull String name, double amount, @NotNull AttributeModifier.Operation operation, @Nullable EquipmentSlot slot) 已过时。AttributeModifier
(@NotNull NamespacedKey key, double amount, @NotNull AttributeModifier.Operation operation, @NotNull EquipmentSlotGroup slot) -
方法概要
修饰符和类型方法说明static @NotNull AttributeModifier
deserialize
(@NotNull Map<String, Object> args) boolean
double
获取该修饰符在根据其AttributeModifier.Operation
运算模式进行计算时的修饰值.getKey()
返回用于此对象的命名空间标识符.getName()
获取该修饰符的名称.获取该修饰符的运算模式.getSlot()
已过时。Get theEquipmentSlot
this AttributeModifier is active on, or null if this modifier is applicable for any slot.已过时。属性现通过 key 区分int
hashCode()
Creates a Map representation of this class.toString()
-
构造器详细资料
-
AttributeModifier
@Deprecated public AttributeModifier(@NotNull @NotNull String name, double amount, @NotNull @NotNull AttributeModifier.Operation operation) 已过时。 -
AttributeModifier
@Deprecated public AttributeModifier(@NotNull @NotNull UUID uuid, @NotNull @NotNull String name, double amount, @NotNull @NotNull AttributeModifier.Operation operation) 已过时。 -
AttributeModifier
@Deprecated public AttributeModifier(@NotNull @NotNull UUID uuid, @NotNull @NotNull String name, double amount, @NotNull @NotNull AttributeModifier.Operation operation, @Nullable @Nullable EquipmentSlot slot) 已过时。 -
AttributeModifier
@Deprecated public AttributeModifier(@NotNull @NotNull UUID uuid, @NotNull @NotNull String name, double amount, @NotNull @NotNull AttributeModifier.Operation operation, @NotNull @NotNull EquipmentSlotGroup slot) 已过时。 -
AttributeModifier
public AttributeModifier(@NotNull @NotNull NamespacedKey key, double amount, @NotNull @NotNull AttributeModifier.Operation operation, @NotNull @NotNull EquipmentSlotGroup slot)
-
-
方法详细资料
-
getUniqueId
已过时。属性现通过 key 区分获取该修饰符的 UUID.原文: Get the unique ID for this modifier.
- 返回:
- UUID
- 另请参阅:
-
getKey
从接口复制的说明:Keyed
返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
getName
获取该修饰符的名称.原文: Get the name of this modifier.
- 返回:
- 名称
-
getAmount
public double getAmount()获取该修饰符在根据其AttributeModifier.Operation
运算模式进行计算时的修饰值.原文: Get the amount by which this modifier will apply its
AttributeModifier.Operation
.- 返回:
- 修饰值
-
getOperation
获取该修饰符的运算模式.原文: Get the operation this modifier will apply.
- 返回:
- 运算模式
-
getSlot
已过时。请使用getSlotGroup()
获取该修饰符生效的EquipmentSlot
,若该修饰符可以在任意槽位生效, 返回 null.
原文: Get the
EquipmentSlot
this AttributeModifier is active on, or null if this modifier is applicable for any slot.- 返回:
- 目标槽位
-
getSlotGroup
Get theEquipmentSlot
this AttributeModifier is active on, or null if this modifier is applicable for any slot.- 返回:
- the slot
-
serialize
从接口复制的说明:ConfigurationSerializable
Creates a Map representation of this class.This class must provide a method to restore this class, as defined in the
ConfigurationSerializable
interface javadocs.- 指定者:
serialize
在接口中ConfigurationSerializable
- 返回:
- Map containing the current state of this class
-
equals
-
hashCode
public int hashCode() -
toString
-
deserialize
-
getSlotGroup()