Record Class GeyserInstrument.Wrapper
java.lang.Object
java.lang.Record
org.geysermc.geyser.inventory.item.GeyserInstrument.Wrapper
- All Implemented Interfaces:
GeyserInstrument
- Enclosing interface:
GeyserInstrument
public static record GeyserInstrument.Wrapper(org.geysermc.mcprotocollib.protocol.data.game.item.component.Instrument instrument)
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
ConstructorsConstructorDescriptionWrapper(org.geysermc.mcprotocollib.protocol.data.game.item.component.Instrument instrument) Creates an instance of aWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionnet.kyori.adventure.text.Componentfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.org.geysermc.mcprotocollib.protocol.data.game.item.component.InstrumentReturns the value of theinstrumentrecord component.floatrange()Optional<net.kyori.adventure.key.Key> 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
-
Wrapper
public Wrapper(org.geysermc.mcprotocollib.protocol.data.game.item.component.Instrument instrument) Creates an instance of aWrapperrecord class.- Parameters:
instrument- the value for theinstrumentrecord component
-
-
Method Details
-
soundEvent
- Specified by:
soundEventin interfaceGeyserInstrument
-
range
public float range()- Specified by:
rangein interfaceGeyserInstrument
-
description
public net.kyori.adventure.text.Component description()- Specified by:
descriptionin interfaceGeyserInstrument
-
bedrockInstrument
- Specified by:
bedrockInstrumentin interfaceGeyserInstrument
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
instrument
public org.geysermc.mcprotocollib.protocol.data.game.item.component.Instrument instrument()Returns the value of theinstrumentrecord component.- Returns:
- the value of the
instrumentrecord component
-