Interface StoreAnswer

All Known Implementing Classes:
StoreAnswer.Refused, StoreAnswer.Unknown, StoreAnswer.Written

public sealed interface StoreAnswer permits StoreAnswer.Written, StoreAnswer.Refused, StoreAnswer.Unknown
The store's answer. The set of answers may grow; unknown answers are treated as Unknown.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Not stored, and nothing of it will be; current is what the store holds now.
    static final record 
    Not known whether it was stored (error, timeout, stall).
    static final record 
    Stored.
  • Method Summary

    Static Methods
    Modifier and Type
    Method
    Description
    refused(List<org.bukkit.inventory.ItemStack> current)
    A refused write with the store's current contents.
    unknown(@Nullable Throwable cause)
    An indeterminate write; the cause may be absent.
    A successful write.
  • Method Details

    • written

      static StoreAnswer written()
      A successful write.
    • refused

      static StoreAnswer refused(List<org.bukkit.inventory.ItemStack> current)
      A refused write with the store's current contents.
    • unknown

      static StoreAnswer unknown(@Nullable @Nullable Throwable cause)
      An indeterminate write; the cause may be absent.