Interface BlockTransactionEvent

All Superinterfaces:
net.kyori.event.Cancellable, Event
All Known Subinterfaces:
BlockTransactionEvent.Buy, BlockTransactionEvent.Sell

public interface BlockTransactionEvent extends net.kyori.event.Cancellable, Event
Represents an event involving a transaction with one or more claim blocks.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Fired when a player attempts to buys bonus blocks.
    static interface 
    Fired when a player attempts to sell blocks.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The amount of blocks involved in transaction.
    Optional<net.kyori.adventure.text.Component>
    Gets the claim message.
    double
    The block transaction price.
    The User involved in transaction.
    void
    setMessage(net.kyori.adventure.text.Component message)
    Sets the claim message to be presented to
    invalid reference
    Subject
    if applicable.

    Methods inherited from interface net.kyori.event.Cancellable

    cancelled, cancelled

    Methods inherited from interface com.griefdefender.api.event.Event

    getCause
  • Method Details

    • getAmount

      int getAmount()
      The amount of blocks involved in transaction.
      Returns:
      The amount of blocks
    • getPrice

      double getPrice()
      The block transaction price.
      Returns:
      The block transaction price
    • getUser

      User getUser()
      The User involved in transaction.
      Returns:
      The user involved in transaction
    • setMessage

      void setMessage(net.kyori.adventure.text.Component message)
      Sets the claim message to be presented to
      invalid reference
      Subject
      if applicable.
      Parameters:
      message - The message
    • getMessage

      Optional<net.kyori.adventure.text.Component> getMessage()
      Gets the claim message. Note: This is only available if event was cancelled.
      Returns:
      The claim message, if available