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 Type
    Method
    Description
    long
    amount(@NotNull ResourceVariant item, @NotNull net.kyori.adventure.key.Key resource)
     
    long
    capacity(@NotNull ResourceVariant item, @NotNull net.kyori.adventure.key.Key resource)
    How much of resource item holds when full; 0 if it cannot hold it.
    withAmount(@NotNull ResourceVariant item, @NotNull net.kyori.adventure.key.Key resource, long amount)
    The same item holding amount of resource.
  • Method Details

    • capacity

      long capacity(@NotNull @NotNull ResourceVariant item, @NotNull @NotNull net.kyori.adventure.key.Key resource)
      How much of resource item holds 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 holding amount of resource.