接口 UseCooldownComponent
- 所有超级接口:
ConfigurationSerializable
表示一个决定此物品使用冷却时间的组件。
-
方法概要
修饰符和类型方法说明获取用于相似物品的自定义冷却组(如果已设置)。float获取此冷却组中的物品可以再次使用所需的时间(以秒为单位)。void设置用于相似物品的自定义冷却组。voidsetCooldownSeconds(float cooldown) 设置此冷却组中的物品可以再次使用所需的时间(以秒为单位)。从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
方法详细资料
-
getCooldownSeconds
float getCooldownSeconds()获取此冷却组中的物品可以再次使用所需的时间(以秒为单位)。原文:Gets the time in seconds it will take for an item in this cooldown group to be available to use again.
- 返回:
- 冷却时间
-
setCooldownSeconds
void setCooldownSeconds(float cooldown) 设置此冷却组中的物品可以再次使用所需的时间(以秒为单位)。原文:Sets the time in seconds it will take for an item in this cooldown group to be available to use again.
- 参数:
cooldown- 新的冷却时间,必须大于0
-
getCooldownGroup
获取用于相似物品的自定义冷却组(如果已设置)。原文:Gets the custom cooldown group to be used for similar items, if set.
- 返回:
- 冷却组
-
setCooldownGroup
设置用于相似物品的自定义冷却组。原文:Sets the custom cooldown group to be used for similar items.
- 参数:
key- 冷却组
-