Record Class EntityEffect.PlaySound
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.EntityEffect.PlaySound
- All Implemented Interfaces:
Enchantment.Effect, EntityEffect, LocationEffect
- Enclosing interface:
EntityEffect
public static record EntityEffect.PlaySound(SoundEvent soundEvent, Codec.RawValue volume, Codec.RawValue pitch)
extends Record
implements EntityEffect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface EntityEffect
EntityEffect.AllOf, EntityEffect.ApplyPotionEffect, EntityEffect.ChangeItemDamage, EntityEffect.DamageEntity, EntityEffect.Explode, EntityEffect.Ignite, EntityEffect.PlaySound, EntityEffect.ReplaceBlock, EntityEffect.ReplaceDisc, EntityEffect.RunFunction, EntityEffect.SetBlockProperties, EntityEffect.SpawnParticles, EntityEffect.SummonEntityNested classes/interfaces inherited from interface LocationEffect
LocationEffect.AllOf -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlaySound(SoundEvent soundEvent, Codec.RawValue volume, Codec.RawValue pitch) Creates an instance of aPlaySoundrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncodec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pitch()Returns the value of thepitchrecord component.Returns the value of thesoundEventrecord component.final StringtoString()Returns a string representation of this record class.volume()Returns the value of thevolumerecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
PlaySound
Creates an instance of aPlaySoundrecord class.- Parameters:
soundEvent- the value for thesoundEventrecord componentvolume- the value for thevolumerecord componentpitch- the value for thepitchrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceEntityEffect- Specified by:
codecin interfaceLocationEffect
-
toString
-
hashCode
-
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). -
soundEvent
Returns the value of thesoundEventrecord component.- Returns:
- the value of the
soundEventrecord component
-
volume
Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
pitch
Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-