Package dev.aurelium.slate.builder
Record Class BuiltItem
java.lang.Object
java.lang.Record
dev.aurelium.slate.builder.BuiltItem
public record BuiltItem(Map<String,ItemReplacer> replacers, ItemReplacer anyReplacer, Map<ClickAction,ItemClicker> clickers, @NotNull ItemModifier modifier, MenuListener initListener)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltItem(Map<String, ItemReplacer> replacers, ItemReplacer anyReplacer, Map<ClickAction, ItemClicker> clickers, @NotNull ItemModifier modifier, MenuListener initListener) Creates an instance of aBuiltItemrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanyReplacerrecord component.applyReplacers(String input, Slate slate, org.bukkit.entity.Player player, ActiveMenu activeMenu, PlaceholderType type) clickers()Returns the value of theclickersrecord component.static BuiltItemfinal booleanIndicates whether some other object is "equal to" this one.voidhandleClick(Set<ClickAction> actions, ItemClick itemClick) final inthashCode()Returns a hash code value for this object.Returns the value of theinitListenerrecord component.@NotNull ItemModifiermodifier()Returns the value of themodifierrecord component.Returns the value of thereplacersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BuiltItem
public BuiltItem(Map<String, ItemReplacer> replacers, ItemReplacer anyReplacer, Map<ClickAction, ItemClicker> clickers, @NotNull @NotNull ItemModifier modifier, MenuListener initListener) Creates an instance of aBuiltItemrecord class.- Parameters:
replacers- the value for thereplacersrecord componentanyReplacer- the value for theanyReplacerrecord componentclickers- the value for theclickersrecord componentmodifier- the value for themodifierrecord componentinitListener- the value for theinitListenerrecord component
-
-
Method Details
-
createEmpty
-
handleClick
-
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). -
replacers
Returns the value of thereplacersrecord component.- Returns:
- the value of the
replacersrecord component
-
anyReplacer
Returns the value of theanyReplacerrecord component.- Returns:
- the value of the
anyReplacerrecord component
-
clickers
Returns the value of theclickersrecord component.- Returns:
- the value of the
clickersrecord component
-
modifier
Returns the value of themodifierrecord component.- Returns:
- the value of the
modifierrecord component
-
initListener
Returns the value of theinitListenerrecord component.- Returns:
- the value of the
initListenerrecord component
-