Interface BlocksAttacks
@NonExtendable
public interface BlocksAttacks
Holds block attacks to the holding player like Shield.
- Since:
- 1.21.6
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@NonNegative floatGets 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.@Nullable RegistryKeySet<DamageType> Gets the DamageType that can bypass the blocking.Gets a list ofDamageReductionof how much damage should be blocked in a given attack.@NonNegative 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
- Since:
- 1.21.6
-
blockDelaySeconds
@Contract(pure=true) @NonNegative float blockDelaySeconds()Gets the amount of time (in seconds) that use must be held before successfully blocking attacks.- Returns:
- the delay in seconds
- Since:
- 1.21.6
-
disableCooldownScale
@Contract(pure=true) @NonNegative 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
- Since:
- 1.21.6
-
damageReductions
Gets a list ofDamageReductionof how much damage should be blocked in a given attack.- Returns:
- a list of damage reductions
- Since:
- 1.21.6
-
itemDamage
Gets how much damage should be applied to the item from a given attack.- Returns:
- the damage function
- Since:
- 1.21.6
-
bypassedBy
Gets the DamageType that can bypass the blocking.- Returns:
- a damage type tag key, or null if there is no such tag key
- Since:
- 1.21.6
-
blockSound
@Contract(pure=true) @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
- Since:
- 1.21.6
-
disableSound
@Contract(pure=true) @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
- Since:
- 1.21.6
-