Record Class GeyserChargeableImpl
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.custom.impl.GeyserChargeableImpl
- All Implemented Interfaces:
org.geysermc.geyser.api.item.custom.v2.component.geyser.GeyserChargeable
public record GeyserChargeableImpl(@org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration, boolean chargeOnDraw, @NonNull List<@NonNull org.geysermc.geyser.api.util.Identifier> ammunition)
extends Record
implements org.geysermc.geyser.api.item.custom.v2.component.geyser.GeyserChargeable
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionGeyserChargeableImpl(@org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration, boolean chargeOnDraw, @NonNull List<@NonNull org.geysermc.geyser.api.util.Identifier> ammunition) Creates an instance of aGeyserChargeableImplrecord class. -
Method Summary
Modifier and TypeMethodDescription@NonNull List<@NonNull org.geysermc.geyser.api.util.Identifier>Returns the value of theammunitionrecord component.booleanReturns the value of thechargeOnDrawrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@org.checkerframework.checker.index.qual.NonNegative floatReturns the value of themaxDrawDurationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GeyserChargeableImpl
public GeyserChargeableImpl(@org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration, boolean chargeOnDraw, @NonNull List<@NonNull org.geysermc.geyser.api.util.Identifier> ammunition) Creates an instance of aGeyserChargeableImplrecord class.- Parameters:
maxDrawDuration- the value for themaxDrawDurationrecord componentchargeOnDraw- the value for thechargeOnDrawrecord componentammunition- the value for theammunitionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
maxDrawDuration
public @org.checkerframework.checker.index.qual.NonNegative float maxDrawDuration()Returns the value of themaxDrawDurationrecord component.- Specified by:
maxDrawDurationin interfaceorg.geysermc.geyser.api.item.custom.v2.component.geyser.GeyserChargeable- Returns:
- the value of the
maxDrawDurationrecord component
-
chargeOnDraw
public boolean chargeOnDraw()Returns the value of thechargeOnDrawrecord component.- Specified by:
chargeOnDrawin interfaceorg.geysermc.geyser.api.item.custom.v2.component.geyser.GeyserChargeable- Returns:
- the value of the
chargeOnDrawrecord component
-
ammunition
Returns the value of theammunitionrecord component.- Specified by:
ammunitionin interfaceorg.geysermc.geyser.api.item.custom.v2.component.geyser.GeyserChargeable- Returns:
- the value of the
ammunitionrecord component
-