Record Class RegistryData.PotionEffectEntry
java.lang.Object
java.lang.Record
net.minestom.server.registry.RegistryData.PotionEffectEntry
- All Implemented Interfaces:
RegistryData.Entry
- Enclosing class:
RegistryData
public static record RegistryData.PotionEffectEntry(Key key, int id, String translationKey, int color, boolean isInstantaneous)
extends Record
implements RegistryData.Entry
-
Constructor Summary
ConstructorsConstructorDescriptionPotionEffectEntry(String namespace, RegistryData.Properties main) PotionEffectEntry(Key key, int id, String translationKey, int color, boolean isInstantaneous) Creates an instance of aPotionEffectEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intid()Returns the value of theidrecord component.booleanReturns the value of theisInstantaneousrecord component.key()Returns the value of thekeyrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.
-
Constructor Details
-
PotionEffectEntry
-
PotionEffectEntry
public PotionEffectEntry(Key key, int id, String translationKey, int color, boolean isInstantaneous) Creates an instance of aPotionEffectEntryrecord class.- Parameters:
key- the value for thekeyrecord componentid- the value for theidrecord componenttranslationKey- the value for thetranslationKeyrecord componentcolor- the value for thecolorrecord componentisInstantaneous- the value for theisInstantaneousrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
translationKey
Returns the value of thetranslationKeyrecord component.- Returns:
- the value of the
translationKeyrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
isInstantaneous
public boolean isInstantaneous()Returns the value of theisInstantaneousrecord component.- Returns:
- the value of the
isInstantaneousrecord component
-