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(@NotNull SoundEvent soundEvent, Codec.RawValue volume, Codec.RawValue pitch)
extends Record
implements EntityEffect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.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.SummonEntity
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.LocationEffect
LocationEffect.AllOf
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPlaySound
(@NotNull SoundEvent soundEvent, Codec.RawValue volume, Codec.RawValue pitch) Creates an instance of aPlaySound
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StructCodec
<EntityEffect.PlaySound> codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.pitch()
Returns the value of thepitch
record component.@NotNull SoundEvent
Returns the value of thesoundEvent
record component.final String
toString()
Returns a string representation of this record class.volume()
Returns the value of thevolume
record component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
PlaySound
public PlaySound(@NotNull @NotNull SoundEvent soundEvent, @NotNull Codec.RawValue volume, @NotNull Codec.RawValue pitch) Creates an instance of aPlaySound
record class.- Parameters:
soundEvent
- the value for thesoundEvent
record componentvolume
- the value for thevolume
record componentpitch
- the value for thepitch
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceEntityEffect
- Specified by:
codec
in 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 thesoundEvent
record component.- Returns:
- the value of the
soundEvent
record component
-
volume
Returns the value of thevolume
record component.- Returns:
- the value of the
volume
record component
-
pitch
Returns the value of thepitch
record component.- Returns:
- the value of the
pitch
record component
-