Package me.qscbm.inlayx.gem
Record Class Gem.PotionEntry
java.lang.Object
java.lang.Record
me.qscbm.inlayx.gem.Gem.PotionEntry
- Enclosing class:
Gem
public static record Gem.PotionEntry(org.bukkit.potion.PotionEffectType effect, int duration, int amplifier, boolean ambient, boolean particles, boolean icon)
extends Record
药水效果的配置值
-
Constructor Summary
ConstructorsConstructorDescriptionPotionEntry(org.bukkit.potion.PotionEffectType effect, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) Creates an instance of aPotionEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanambient()Returns the value of theambientrecord component.intReturns the value of theamplifierrecord component.intduration()Returns the value of thedurationrecord component.org.bukkit.potion.PotionEffectTypeeffect()Returns the value of theeffectrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanicon()Returns the value of theiconrecord component.booleanReturns the value of theparticlesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PotionEntry
public PotionEntry(org.bukkit.potion.PotionEffectType effect, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) Creates an instance of aPotionEntryrecord class.- Parameters:
effect- the value for theeffectrecord componentduration- the value for thedurationrecord componentamplifier- the value for theamplifierrecord componentambient- the value for theambientrecord componentparticles- the value for theparticlesrecord componenticon- the value for theiconrecord 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 '=='. -
effect
public org.bukkit.potion.PotionEffectType effect()Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
amplifier
public int amplifier()Returns the value of theamplifierrecord component.- Returns:
- the value of the
amplifierrecord component
-
ambient
public boolean ambient()Returns the value of theambientrecord component.- Returns:
- the value of the
ambientrecord component
-
particles
public boolean particles()Returns the value of theparticlesrecord component.- Returns:
- the value of the
particlesrecord component
-
icon
public boolean icon()Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-