Record Class BukkitItemStack
java.lang.Object
java.lang.Record
kr.toxicity.model.api.bukkit.platform.BukkitItemStack
- Record Components:
source- the source Bukkit item stack
- All Implemented Interfaces:
kr.toxicity.model.api.platform.PlatformItemStack
public record BukkitItemStack(@NotNull org.bukkit.inventory.ItemStack source)
extends Record
implements kr.toxicity.model.api.platform.PlatformItemStack
Represents a Bukkit item stack wrapped as a
PlatformItemStack.- Since:
- 2.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionBukkitItemStack(@NotNull org.bukkit.inventory.ItemStack source) Creates an instance of aBukkitItemStackrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull kr.toxicity.model.api.platform.PlatformItemStackclone()@NotNull kr.toxicity.model.api.platform.PlatformItemStackenchant(boolean enchant) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisAir()@NotNull kr.toxicity.model.api.platform.PlatformItemStackmodelData(int customModelData, @Nullable kr.toxicity.model.api.platform.PlatformNamespace namespace) @NotNull org.bukkit.inventory.ItemStacksource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
BukkitItemStack
public BukkitItemStack(@NotNull @NotNull org.bukkit.inventory.ItemStack source) Creates an instance of aBukkitItemStackrecord class.- Parameters:
source- the value for thesourcerecord component
-
-
Method Details
-
isAir
public boolean isAir()- Specified by:
isAirin interfacekr.toxicity.model.api.platform.PlatformItemStack
-
enchant
@NotNull public @NotNull kr.toxicity.model.api.platform.PlatformItemStack enchant(boolean enchant) - Specified by:
enchantin interfacekr.toxicity.model.api.platform.PlatformItemStack
-
modelData
@NotNull public @NotNull kr.toxicity.model.api.platform.PlatformItemStack modelData(int customModelData, @Nullable @Nullable kr.toxicity.model.api.platform.PlatformNamespace namespace) - Specified by:
modelDatain interfacekr.toxicity.model.api.platform.PlatformItemStack
-
clone
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
source
-