Package dev.aurelium.slate.builder
Record Class BuiltMenu
java.lang.Object
java.lang.Record
dev.aurelium.slate.builder.BuiltMenu
public record BuiltMenu(Map<String,BuiltItem> items, Map<String,BuiltTemplate<?>> templates, Map<String,BuiltComponent<?>> components, Map<String,ItemReplacer> titleReplacers, ItemReplacer titleAnyReplacer, PageProvider pageProvider, PropertyProvider propertyProvider, ItemModifier fillItem, MenuListener openListener, MenuListener updateListener, Map<String,Object> defaultOptions)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionBuiltMenu(Map<String, BuiltItem> items, Map<String, BuiltTemplate<?>> templates, Map<String, BuiltComponent<?>> components, Map<String, ItemReplacer> titleReplacers, ItemReplacer titleAnyReplacer, PageProvider pageProvider, PropertyProvider propertyProvider, ItemModifier fillItem, MenuListener openListener, MenuListener updateListener, Map<String, Object> defaultOptions) Creates an instance of aBuiltMenurecord class. -
Method Summary
Modifier and TypeMethodDescriptionapplyTitleReplacers(String input, Slate slate, org.bukkit.entity.Player player, ActiveMenu activeMenu) Map<String,BuiltComponent<?>> Returns the value of thecomponentsrecord component.static BuiltMenuReturns the value of thedefaultOptionsrecord component.final booleanIndicates whether some other object is "equal to" this one.fillItem()Returns the value of thefillItemrecord component.<T> BuiltComponent<T>getComponent(String name, Class<T> contextType) <T> BuiltTemplate<T>getTemplate(String name, Class<T> contextType) final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.Returns the value of theopenListenerrecord component.Returns the value of thepageProviderrecord component.Returns the value of thepropertyProviderrecord component.Map<String,BuiltTemplate<?>> Returns the value of thetemplatesrecord component.Returns the value of thetitleAnyReplacerrecord component.Returns the value of thetitleReplacersrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theupdateListenerrecord component.
-
Constructor Details
-
BuiltMenu
public BuiltMenu(Map<String, BuiltItem> items, Map<String, BuiltTemplate<?>> templates, Map<String, BuiltComponent<?>> components, Map<String, ItemReplacer> titleReplacers, ItemReplacer titleAnyReplacer, PageProvider pageProvider, PropertyProvider propertyProvider, ItemModifier fillItem, MenuListener openListener, MenuListener updateListener, Map<String, Object> defaultOptions) Creates an instance of aBuiltMenurecord class.- Parameters:
items- the value for theitemsrecord componenttemplates- the value for thetemplatesrecord componentcomponents- the value for thecomponentsrecord componenttitleReplacers- the value for thetitleReplacersrecord componenttitleAnyReplacer- the value for thetitleAnyReplacerrecord componentpageProvider- the value for thepageProviderrecord componentpropertyProvider- the value for thepropertyProviderrecord componentfillItem- the value for thefillItemrecord componentopenListener- the value for theopenListenerrecord componentupdateListener- the value for theupdateListenerrecord componentdefaultOptions- the value for thedefaultOptionsrecord component
-
-
Method Details
-
createEmpty
-
getTemplate
-
getComponent
-
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). -
items
Returns the value of theitemsrecord component.- Returns:
- the value of the
itemsrecord component
-
templates
Returns the value of thetemplatesrecord component.- Returns:
- the value of the
templatesrecord component
-
components
Returns the value of thecomponentsrecord component.- Returns:
- the value of the
componentsrecord component
-
titleReplacers
Returns the value of thetitleReplacersrecord component.- Returns:
- the value of the
titleReplacersrecord component
-
titleAnyReplacer
Returns the value of thetitleAnyReplacerrecord component.- Returns:
- the value of the
titleAnyReplacerrecord component
-
pageProvider
Returns the value of thepageProviderrecord component.- Returns:
- the value of the
pageProviderrecord component
-
propertyProvider
Returns the value of thepropertyProviderrecord component.- Returns:
- the value of the
propertyProviderrecord component
-
fillItem
Returns the value of thefillItemrecord component.- Returns:
- the value of the
fillItemrecord component
-
openListener
Returns the value of theopenListenerrecord component.- Returns:
- the value of the
openListenerrecord component
-
updateListener
Returns the value of theupdateListenerrecord component.- Returns:
- the value of the
updateListenerrecord component
-
defaultOptions
Returns the value of thedefaultOptionsrecord component.- Returns:
- the value of the
defaultOptionsrecord component
-