Class InternalCooldown
java.lang.Object
io.github.xrickastley.sevenelements.element.InternalCooldown
An
In addition to this, this class is also the handler for the Internal Cooldown system.
When the Internal Cooldown is considered active through
To read more about the
InternalCooldown is a class used for holding the various InternalCooldown
components together in a single class. In addition to this, this class is also the handler for the Internal Cooldown system.
When the Internal Cooldown is considered active through
isInInternalCooldown(),
elements should not be applied or refreshed. To read more about the
InternalCooldown, refer to the InternalCooldownContext class.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final InternalCooldownHolderprivate final InternalCooldownTagprivate intprivate final InternalCooldownType -
Constructor Summary
ConstructorsConstructorDescriptionInternalCooldown(InternalCooldownHolder holder, InternalCooldownTag tag, InternalCooldownType type) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetIdentifier(InternalCooldownTag tag, InternalCooldownType type) static StringgetIdentifier(String tag, InternalCooldownType type) booleanHandles the Internal Cooldown.booleanChecks if an element can be applied based on this Internal Cooldown.(package private) static InternalCooldownnone(InternalCooldownHolder holder)
-
Field Details
-
holder
-
type
-
tag
-
cooldown
private int cooldown -
totalHits
private int totalHits
-
-
Constructor Details
-
InternalCooldown
InternalCooldown(InternalCooldownHolder holder, InternalCooldownTag tag, InternalCooldownType type)
-
-
Method Details
-
getIdentifier
-
getIdentifier
-
none
-
isInInternalCooldown
public boolean isInInternalCooldown()Checks if an element can be applied based on this Internal Cooldown.
For registering a hit and checking the Internal Cooldown after, usehandleInternalCooldown()instead.- See Also:
-
handleInternalCooldown
public boolean handleInternalCooldown()Handles the Internal Cooldown.
Upon using this method, a hit is registered, and it returns Whether the element can be applied.
For only checking the Internal Cooldown without registering a hit, useisInInternalCooldown()instead.- See Also:
-