Interface BlocksAttacks
Holds block attacks to the holding player like Shield.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfloatGets the amount of time (in seconds) that use must be held before successfully blocking attacks.static BlocksAttacks.Builder@Nullable net.kyori.adventure.key.KeyGets the key sound to play when an attack is successfully blocked.Gets the DamageType that can bypass the blocking.Gets a list ofDamageReductionof how much damage should be blocked in a given attack.floatGets the multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier forWeapon.disableBlockingForSeconds()).@Nullable net.kyori.adventure.key.KeyGets the key sound to play when the item goes on its disabled cooldown due to an attack.Gets how much damage should be applied to the item from a given attack.
-
Method Details
-
blocksAttacks
-
blockDelaySeconds
float blockDelaySeconds()Gets the amount of time (in seconds) that use must be held before successfully blocking attacks.- Returns:
- the delay in seconds
-
disableCooldownScale
float disableCooldownScale()Gets the multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier forWeapon.disableBlockingForSeconds()).
If set to 0, this item can never be disabled by attacks.- Returns:
- the multiplier for the cooldown time
-
damageReductions
List<DamageReduction> damageReductions()Gets a list ofDamageReductionof how much damage should be blocked in a given attack.- Returns:
- a list of damage reductions
-
itemDamage
ItemDamageFunction itemDamage()Gets how much damage should be applied to the item from a given attack.- Returns:
- the damage function
-
bypassedBy
@Nullable TagKey<DamageType> bypassedBy()Gets the DamageType that can bypass the blocking.- Returns:
- a damage type tag key, or null if there is no such tag key
-
blockSound
@Nullable net.kyori.adventure.key.Key blockSound()Gets the key sound to play when an attack is successfully blocked.- Returns:
- a key of the sound
-
disableSound
@Nullable net.kyori.adventure.key.Key disableSound()Gets the key sound to play when the item goes on its disabled cooldown due to an attack.- Returns:
- a key of the sound
-