Package net.minestom.server.item.enchant
Record Class LocationEffect.AllOf
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.LocationEffect.AllOf
- All Implemented Interfaces:
Enchantment.Effect
,LocationEffect
- Enclosing interface:
LocationEffect
public static record LocationEffect.AllOf(@NotNull List<LocationEffect> effect)
extends Record
implements LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.LocationEffect
LocationEffect.AllOf
-
Field Summary
-
Constructor Summary
ConstructorDescriptionAllOf
(@NotNull List<LocationEffect> effect) Creates an instance of aAllOf
record class. -
Method Summary
Modifier and TypeMethodDescription@NotNull List
<LocationEffect> effect()
Returns the value of theeffect
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull BinaryTagSerializer
<LocationEffect.AllOf> nbtType()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
NBT_TYPE
-
-
Constructor Details
-
AllOf
Creates an instance of aAllOf
record class.- Parameters:
effect
- the value for theeffect
record component
-
-
Method Details
-
nbtType
- Specified by:
nbtType
in interfaceLocationEffect
-
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)
. -
effect
Returns the value of theeffect
record component.- Returns:
- the value of the
effect
record component
-