Interface ItemResources.Access
- All Known Implementing Classes:
PaperItemResources
- Enclosing class:
ItemResources
public static interface ItemResources.Access
Reads and writes the resources an item resource holds.
-
Method Summary
Modifier and TypeMethodDescriptionlongamount(@NotNull ResourceVariant item, @NotNull net.kyori.adventure.key.Key resource) longcapacity(@NotNull ResourceVariant item, @NotNull net.kyori.adventure.key.Key resource) How much ofresourceitemholds when full; 0 if it cannot hold it.@NotNull ResourceVariantwithAmount(@NotNull ResourceVariant item, @NotNull net.kyori.adventure.key.Key resource, long amount) The same item holdingamountofresource.
-
Method Details
-
capacity
long capacity(@NotNull @NotNull ResourceVariant item, @NotNull @NotNull net.kyori.adventure.key.Key resource) How much ofresourceitemholds when full; 0 if it cannot hold it. -
amount
long amount(@NotNull @NotNull ResourceVariant item, @NotNull @NotNull net.kyori.adventure.key.Key resource) -
withAmount
@NotNull @NotNull ResourceVariant withAmount(@NotNull @NotNull ResourceVariant item, @NotNull @NotNull net.kyori.adventure.key.Key resource, long amount) The same item holdingamountofresource.
-