Interface CooldownEvent.Set
-
- All Superinterfaces:
Cancellable
,CooldownEvent
,Event
- Enclosing interface:
- CooldownEvent
public static interface CooldownEvent.Set extends CooldownEvent, Cancellable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.entity.living.player.CooldownEvent
CooldownEvent.End, CooldownEvent.Set
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Ticks
newCooldown()
Gets the new cooldown the item type has for the player.Ticks
originalNewCooldown()
Gets the original new set cooldown at the beginning of the event.void
setNewCooldown(Ticks ticks)
Sets the new cooldown for the item type for the player.java.util.Optional<Ticks>
startingCooldown()
Gets the cooldown the item type had beforehand, if it had one at all.-
Methods inherited from interface org.spongepowered.api.event.Cancellable
isCancelled, setCancelled
-
Methods inherited from interface org.spongepowered.api.event.entity.living.player.CooldownEvent
itemType, player
-
-
-
-
Method Detail
-
startingCooldown
java.util.Optional<Ticks> startingCooldown()
Gets the cooldown the item type had beforehand, if it had one at all.- Returns:
- The cooldown of the item type beforehand
-
originalNewCooldown
Ticks originalNewCooldown()
Gets the original new set cooldown at the beginning of the event.- Returns:
- The originally set cooldown
-
newCooldown
Ticks newCooldown()
Gets the new cooldown the item type has for the player.- Returns:
- The new cooldown of the item type
-
setNewCooldown
void setNewCooldown(Ticks ticks)
Sets the new cooldown for the item type for the player.- Parameters:
ticks
- The amount of ticks the cooldown should last for
-
-