Record Class JavaToolImpl.RuleImpl
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.custom.impl.JavaToolImpl.RuleImpl
- All Implemented Interfaces:
org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool.Rule
- Enclosing class:
- JavaToolImpl
public static record JavaToolImpl.RuleImpl(org.geysermc.geyser.api.util.Holders blocks, float speed)
extends Record
implements org.geysermc.geyser.api.item.custom.v2.component.java.JavaTool.Rule
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRuleImpl(org.geysermc.geyser.api.util.Holders blocks, float speed) Creates an instance of aRuleImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionorg.geysermc.geyser.api.util.Holdersblocks()Returns the value of theblocksrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatspeed()Returns the value of thespeedrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RuleImpl
public RuleImpl(org.geysermc.geyser.api.util.Holders blocks, float speed) Creates an instance of aRuleImplrecord class.- Parameters:
blocks- the value for theblocksrecord componentspeed- the value for thespeedrecord 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 '=='. -
blocks
public org.geysermc.geyser.api.util.Holders blocks()Returns the value of theblocksrecord component.- Specified by:
blocksin interfaceorg.geysermc.geyser.api.item.custom.v2.component.java.JavaTool.Rule- Returns:
- the value of the
blocksrecord component
-
speed
public float speed()Returns the value of thespeedrecord component.- Specified by:
speedin interfaceorg.geysermc.geyser.api.item.custom.v2.component.java.JavaTool.Rule- Returns:
- the value of the
speedrecord component
-