public interface KitRedeemResult
Modifier and Type | Interface and Description |
---|---|
static class |
KitRedeemResult.Status |
Modifier and Type | Method and Description |
---|---|
default java.util.Optional<java.time.Duration> |
getCooldownDuration()
|
java.util.Optional<java.time.Instant> |
getCooldownExpiry()
Specifies when the next redemption opportunity is.
|
java.util.Optional<org.spongepowered.api.text.Text> |
getMessage()
If the redemption was cancelled by an event, gets the associated message.
|
KitRedeemResult.Status |
getStatus()
Gets the status of this result.
|
default boolean |
isSuccess()
Whether this redemption was a success.
|
java.util.Collection<org.spongepowered.api.item.inventory.ItemStackSnapshot> |
rejectedItems()
The items that didn't make it into the inventory if the kit was otherwise
successfully redeemed.
|
default boolean isSuccess()
KitRedeemResult.Status getStatus()
java.util.Optional<java.time.Instant> getCooldownExpiry()
isSuccess()
is true, this returns the next
time the Kit
can be redeemed by the player.Instant
redemption may next happen, if a cooldown is
currently in effect.default java.util.Optional<java.time.Duration> getCooldownDuration()
Duration
, if any.java.util.Optional<org.spongepowered.api.text.Text> getMessage()
java.util.Collection<org.spongepowered.api.item.inventory.ItemStackSnapshot> rejectedItems()