Record Class StoreItemDefinition<M>
java.lang.Object
java.lang.Record
net.blueva.arcade.api.store.StoreItemDefinition<M>
- Type Parameters:
M- the material/icon type (platform-specific)- Record Components:
id- the unique identifier of this itemdisplayName- the user-friendly name displayed in the store interfaceicon- the icon/material representing this item in menusdescription- a list of description lines shown to playersprice- the cost of this item in coins (0 for free items)enabled- whether this item is currently active and available for purchasedefaultUnlocked- whether players have this item unlocked by default without purchasing
public record StoreItemDefinition<M>(String id, String displayName, M icon, List<String> description, int price, boolean enabled, boolean defaultUnlocked)
extends Record
Defines a purchasable store item.
Store items represent cosmetics, effects, or other purchasable content that players can buy using in-game currency. Items belong to categories and can be unlocked by default or require purchase.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thedefaultUnlockedrecord component.Returns the value of thedescriptionrecord component.Returns the value of thedisplayNamerecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.id()Returns the value of theidrecord component.intprice()Returns the value of thepricerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
StoreItemDefinition
public StoreItemDefinition(String id, String displayName, M icon, List<String> description, int price, boolean enabled, boolean defaultUnlocked) Creates an instance of aStoreItemDefinitionrecord class.- Parameters:
id- the value for theidrecord componentdisplayName- the value for thedisplayNamerecord componenticon- the value for theiconrecord componentdescription- the value for thedescriptionrecord componentprice- the value for thepricerecord componentenabled- the value for theenabledrecord componentdefaultUnlocked- the value for thedefaultUnlockedrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
icon
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
price
-
enabled
-
defaultUnlocked
public boolean defaultUnlocked()Returns the value of thedefaultUnlockedrecord component.- Returns:
- the value of the
defaultUnlockedrecord component
-