Record Class VirtualItemHandler.ItemResult
java.lang.Object
java.lang.Record
io.github.thebusybiscuit.slimefun4.api.items.virtual.VirtualItemHandler.ItemResult
- Record Components:
handled- Whether the handler processed this requestitem- The replacement item, may be null to clear the slot
- Enclosing interface:
VirtualItemHandler
public static record VirtualItemHandler.ItemResult(boolean handled, @Nullable org.bukkit.inventory.ItemStack item)
extends Record
A handled value result for operations that replace a stack.
-
Constructor Summary
ConstructorsConstructorDescriptionItemResult(boolean handled, org.bukkit.inventory.ItemStack item) Creates an instance of aItemResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanhandled()Returns the value of thehandledrecord component.handled(org.bukkit.inventory.ItemStack item) final inthashCode()Returns a hash code value for this object.org.bukkit.inventory.ItemStackitem()Returns the value of theitemrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
notHandled
-
handled
@Nonnull public static VirtualItemHandler.ItemResult handled(@Nullable org.bukkit.inventory.ItemStack item) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
handled
public boolean handled()Returns the value of thehandledrecord component.- Returns:
- the value of the
handledrecord component
-
item
@Nullable public org.bukkit.inventory.ItemStack item()Returns the value of theitemrecord component.- Returns:
- the value of the
itemrecord component
-