Interface BlocksAttacks
Holds block attacks to the holding player like Shield.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfloat
Gets the amount of time (in seconds) that use must be held before successfully blocking attacks.static BlocksAttacks.Builder
Gets the key sound to play when an attack is successfully blocked.Gets the DamageType that can bypass the blocking.Gets a list ofDamageReduction
of how much damage should be blocked in a given attack.float
Gets the multiplier applied to the cooldown time for the item when attacked by a disabling attack (the multiplier forWeapon.disableBlockingForSeconds()
).Gets 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 ofDamageReduction
of 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
Gets the key sound to play when an attack is successfully blocked.- Returns:
- a key of the sound
-
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
-