Record Class UseCooldown
java.lang.Object
java.lang.Record
net.minestom.server.item.component.UseCooldown
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec
<UseCooldown> static final NetworkBuffer.Type
<UseCooldown> -
Constructor Summary
ConstructorsConstructorDescriptionUseCooldown
(float seconds, @Nullable String cooldownGroup) Creates an instance of aUseCooldown
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable String
Returns the value of thecooldownGroup
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.float
seconds()
Returns the value of theseconds
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
UseCooldown
Creates an instance of aUseCooldown
record class.- Parameters:
seconds
- the value for theseconds
record componentcooldownGroup
- the value for thecooldownGroup
record component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with thecompare
method from their corresponding wrapper classes. -
seconds
public float seconds()Returns the value of theseconds
record component.- Returns:
- the value of the
seconds
record component
-
cooldownGroup
Returns the value of thecooldownGroup
record component.- Returns:
- the value of the
cooldownGroup
record component
-