Package studio.mevera.lotus.api.button
Record Class StaticButton
java.lang.Object
java.lang.Record
studio.mevera.lotus.api.button.StaticButton
- All Implemented Interfaces:
Button
public record StaticButton(@NotNull org.bukkit.inventory.ItemStack item, @NotNull DataRegistry data)
extends Record
implements Button
-
Constructor Summary
ConstructorsConstructorDescriptionStaticButton(@NotNull org.bukkit.inventory.ItemStack item, @NotNull DataRegistry data) Creates an instance of aStaticButtonrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull DataRegistrydata()Returns the value of thedatarecord component.voiddispatch(@NotNull MenuView<?, ?> view, @NotNull org.bukkit.event.inventory.InventoryClickEvent event) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull org.bukkit.inventory.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.@NotNull StaticButtonwithItem(@NotNull org.bukkit.inventory.ItemStack item)
-
Constructor Details
-
StaticButton
public StaticButton(@NotNull @NotNull org.bukkit.inventory.ItemStack item, @NotNull @NotNull DataRegistry data) Creates an instance of aStaticButtonrecord class.- Parameters:
item- the value for theitemrecord componentdata- the value for thedatarecord component
-
-
Method Details
-
withItem
@NotNull public @NotNull StaticButton withItem(@NotNull @NotNull org.bukkit.inventory.ItemStack item) -
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). -
item
@NotNull public @NotNull org.bukkit.inventory.ItemStack item()Returns the value of theitemrecord component. -
data
Returns the value of thedatarecord component.
-