Package net.minestom.server.registry
Record Class Registry.JukeboxSongEntry
java.lang.Object
java.lang.Record
net.minestom.server.registry.Registry.JukeboxSongEntry
- All Implemented Interfaces:
Registry.Entry
- Enclosing class:
Registry
public static record Registry.JukeboxSongEntry(NamespaceID namespace, SoundEvent soundEvent, Component description, float lengthInSeconds, int comparatorOutput, Registry.Properties custom)
extends Record
implements Registry.Entry
-
Constructor Summary
ConstructorsConstructorDescriptionJukeboxSongEntry(String namespace, Registry.Properties main, Registry.Properties custom) JukeboxSongEntry(NamespaceID namespace, SoundEvent soundEvent, Component description, float lengthInSeconds, int comparatorOutput, Registry.Properties custom) Creates an instance of aJukeboxSongEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecomparatorOutputrecord component.custom()Returns the value of thecustomrecord 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.floatReturns the value of thelengthInSecondsrecord component.Returns the value of thenamespacerecord component.Returns the value of thesoundEventrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JukeboxSongEntry
-
JukeboxSongEntry
public JukeboxSongEntry(NamespaceID namespace, SoundEvent soundEvent, Component description, float lengthInSeconds, int comparatorOutput, Registry.Properties custom) Creates an instance of aJukeboxSongEntryrecord class.- Parameters:
namespace- the value for thenamespacerecord componentsoundEvent- the value for thesoundEventrecord componentdescription- the value for thedescriptionrecord componentlengthInSeconds- the value for thelengthInSecondsrecord componentcomparatorOutput- the value for thecomparatorOutputrecord componentcustom- the value for thecustomrecord 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 '=='. -
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
soundEvent
Returns the value of thesoundEventrecord component.- Returns:
- the value of the
soundEventrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
lengthInSeconds
public float lengthInSeconds()Returns the value of thelengthInSecondsrecord component.- Returns:
- the value of the
lengthInSecondsrecord component
-
comparatorOutput
public int comparatorOutput()Returns the value of thecomparatorOutputrecord component.- Returns:
- the value of the
comparatorOutputrecord component
-
custom
Returns the value of thecustomrecord component.- Specified by:
customin interfaceRegistry.Entry- Returns:
- the value of the
customrecord component
-