Package com.griefdefender.api.event
Interface BlockTransactionEvent
- All Superinterfaces:
net.kyori.event.Cancellable,Event
- All Known Subinterfaces:
BlockTransactionEvent.Buy,BlockTransactionEvent.Sell
Represents an event involving a transaction with one or more claim blocks.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFired when a player attempts to buys bonus blocks.static interfaceFired when a player attempts to sell blocks. -
Method Summary
Modifier and TypeMethodDescriptionintThe amount of blocks involved in transaction.Optional<net.kyori.adventure.text.Component> Gets the claim message.doublegetPrice()The block transaction price.getUser()TheUserinvolved in transaction.voidsetMessage(net.kyori.adventure.text.Component message) Sets the claim message to be presented toif applicable.invalid reference
SubjectMethods inherited from interface net.kyori.event.Cancellable
cancelled, cancelled
-
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()TheUserinvolved in transaction.- Returns:
- The user involved in transaction
-
setMessage
void setMessage(net.kyori.adventure.text.Component message) Sets the claim message to be presented toif applicable.invalid reference
Subject- 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
-