Record Class GeyserInstrument.Impl
java.lang.Object
java.lang.Record
org.geysermc.geyser.inventory.item.GeyserInstrument.Impl
- All Implemented Interfaces:
GeyserInstrument
- Enclosing interface:
GeyserInstrument
public static record GeyserInstrument.Impl(String soundEvent, float range, String description, @Nullable GeyserInstrument.BedrockInstrument bedrockInstrument)
extends Record
implements GeyserInstrument
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.geyser.inventory.item.GeyserInstrument
GeyserInstrument.BedrockInstrument, GeyserInstrument.Impl, GeyserInstrument.Wrapper -
Constructor Summary
ConstructorsConstructorDescriptionImpl(String soundEvent, float range, String description, @Nullable GeyserInstrument.BedrockInstrument bedrockInstrument) Creates an instance of aImplrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable GeyserInstrument.BedrockInstrumentReturns the value of thebedrockInstrumentrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatrange()Returns the value of therangerecord component.Returns the value of thesoundEventrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.inventory.item.GeyserInstrument
bedrockId
-
Constructor Details
-
Impl
public Impl(String soundEvent, float range, String description, @Nullable GeyserInstrument.BedrockInstrument bedrockInstrument) Creates an instance of aImplrecord class.- Parameters:
soundEvent- the value for thesoundEventrecord componentrange- the value for therangerecord componentdescription- the value for thedescriptionrecord componentbedrockInstrument- the value for thebedrockInstrumentrecord 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 '=='. -
soundEvent
Returns the value of thesoundEventrecord component.- Specified by:
soundEventin interfaceGeyserInstrument- Returns:
- the value of the
soundEventrecord component
-
range
public float range()Returns the value of therangerecord component.- Specified by:
rangein interfaceGeyserInstrument- Returns:
- the value of the
rangerecord component
-
description
Returns the value of thedescriptionrecord component.- Specified by:
descriptionin interfaceGeyserInstrument- Returns:
- the value of the
descriptionrecord component
-
bedrockInstrument
Returns the value of thebedrockInstrumentrecord component.- Specified by:
bedrockInstrumentin interfaceGeyserInstrument- Returns:
- the value of the
bedrockInstrumentrecord component
-