Package dev.aurelium.slate.item
Record Class ItemVariant
java.lang.Object
java.lang.Record
dev.aurelium.slate.item.ItemVariant
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable org.bukkit.inventory.ItemStackbaseItem()Returns the value of thebaseItemrecord component.@Nullable StringReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lore()Returns the value of thelorerecord component.Returns the value of thepositionsrecord component.Returns the value of thepropertyFiltersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ItemVariant
public ItemVariant(@NonNull Map<String, Object> propertyFilters, @Nullable org.bukkit.inventory.ItemStack baseItem, @Nullable List<SlotPos> positions, @Nullable String displayName, @NonNull List<LoreLine> lore) Creates an instance of aItemVariantrecord class.- Parameters:
propertyFilters- the value for thepropertyFiltersrecord componentbaseItem- the value for thebaseItemrecord componentpositions- the value for thepositionsrecord componentdisplayName- the value for thedisplayNamerecord componentlore- the value for thelorerecord component
-
-
Method Details
-
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). -
propertyFilters
Returns the value of thepropertyFiltersrecord component.- Returns:
- the value of the
propertyFiltersrecord component
-
baseItem
public @Nullable org.bukkit.inventory.ItemStack baseItem()Returns the value of thebaseItemrecord component.- Returns:
- the value of the
baseItemrecord component
-
positions
Returns the value of thepositionsrecord component.- Returns:
- the value of the
positionsrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
lore
Returns the value of thelorerecord component.- Returns:
- the value of the
lorerecord component
-