接口 PiercingWeaponComponent
- 所有超级接口:
ConfigurationSerializable
表示一个可以将任何物品转变为穿透武器的组件,该武器可以伤害多个实体。
-
方法概要
修饰符和类型方法说明获取物品成功击中目标时播放的音效。getSound()获取使用物品时播放的音效。boolean获取攻击是否会对目标造成击退效果。boolean获取攻击是否会使目标下马。voidsetDealsKnockback(boolean knockback) 设置攻击是否会对目标造成击退效果。voidsetDismounts(boolean dismounts) 设置攻击是否会使目标下马。voidsetHitSound(@Nullable Sound sound) 设置物品成功击中目标时播放的音效。void设置使用物品时播放的音效。从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
-
方法详细资料
-
isDealsKnockback
boolean isDealsKnockback()获取攻击是否会对目标造成击退效果。原文:Gets whether the attack deals knockback to the target.
- 返回:
- 如果有击退效果则返回true
-
setDealsKnockback
void setDealsKnockback(boolean knockback) 设置攻击是否会对目标造成击退效果。原文:Sets whether the attack deals knockback to the target.
- 参数:
knockback- 如果有击退效果则为true
-
isDismounts
boolean isDismounts()获取攻击是否会使目标下马。原文:Gets whether the attack dismounts the target.
- 返回:
- 如果会使目标下马则返回true
-
setDismounts
void setDismounts(boolean dismounts) 设置攻击是否会使目标下马。原文:Sets whether the attack dismounts the target.
- 参数:
dismounts- 如果会使目标下马则为true
-
getSound
获取使用物品时播放的音效。原文:Gets the sound to play when the item is used.
- 返回:
- 音效
-
setSound
设置使用物品时播放的音效。原文:Sets the sound to play when the item is used.
- 参数:
sound- 音效或null表示使用当前默认值
-
getHitSound
获取物品成功击中目标时播放的音效。原文:Gets the sound to play when the item successfully hits a target.
- 返回:
- 音效
-
setHitSound
设置物品成功击中目标时播放的音效。原文:Sets the sound to play when the item successfully hits a target.
- 参数:
sound- 音效或null表示使用当前默认值
-