Record Class SwingAnimation
java.lang.Object
java.lang.Record
net.minestom.server.item.component.SwingAnimation
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Codec<SwingAnimation> static final SwingAnimationstatic final NetworkBuffer.Type<SwingAnimation> -
Constructor Summary
ConstructorsConstructorDescriptionSwingAnimation(SwingAnimation.Type type, int duration) Creates an instance of aSwingAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Field Details
-
DEFAULT
-
NETWORK_TYPE
-
CODEC
-
-
Constructor Details
-
SwingAnimation
Creates an instance of aSwingAnimationrecord class.- Parameters:
type- the value for thetyperecord componentduration- the value for thedurationrecord 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 thecomparemethod from their corresponding wrapper classes. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-