Record Class TerminalAlcohol
java.lang.Object
java.lang.Record
ke.ric.api.item.TerminalAlcohol
A finished drink's alcohol, deliberately independent of fermentation/brewing profiles.
-
Constructor Summary
ConstructorsConstructorDescriptionTerminalAlcohol(double abv, int quality, boolean integrated) Creates an instance of aTerminalAlcoholrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleabv()Returns the value of theabvrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theintegratedrecord component.static booleanisMarked(org.bukkit.inventory.ItemStack item) Also detects incomplete or malformed terminal metadata so callers can fail closed.intquality()Returns the value of thequalityrecord component.static TerminalAlcoholread(org.bukkit.inventory.ItemStack item) static TerminalAlcoholread(org.bukkit.persistence.PersistentDataContainer pdc) final StringtoString()Returns a string representation of this record class.voidwrite(org.bukkit.inventory.ItemStack item)
-
Constructor Details
-
TerminalAlcohol
public TerminalAlcohol(double abv, int quality, boolean integrated) Creates an instance of aTerminalAlcoholrecord class.- Parameters:
abv- the value for theabvrecord componentquality- the value for thequalityrecord componentintegrated- the value for theintegratedrecord component
-
-
Method Details
-
write
public void write(org.bukkit.inventory.ItemStack item) -
isMarked
public static boolean isMarked(org.bukkit.inventory.ItemStack item) Also detects incomplete or malformed terminal metadata so callers can fail closed. -
read
-
read
-
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 with thecomparemethod from their corresponding wrapper classes. -
abv
public double abv()Returns the value of theabvrecord component.- Returns:
- the value of the
abvrecord component
-
quality
public int quality()Returns the value of thequalityrecord component.- Returns:
- the value of the
qualityrecord component
-
integrated
public boolean integrated()Returns the value of theintegratedrecord component.- Returns:
- the value of the
integratedrecord component
-