Skip to main content

Events

All events are in com.sigma.orders.api.events and extend SigmaEvent. None are cancellable: they fire after the action happened and was saved.

Common getters​

GetterDescription
getSource()EventSource: PLAYER (menus and commands), QUICK_BUY, SELL_GUI, ADMIN (staff), SERVER (expiry, bot add-ons) or API
isBot()True for bot orders, bot listings and admin listings (no real player behind them)
isAsynchronous()True when fired off the main/region thread, which is common for order events

Auction events​

Filtered by auction.enabled and auction.include-bot-listings in api.yml.

EventCancellableWhen firedKey getters
AuctionListingCreateEventNoA listing is created: by a player (PLAYER), the Random Auction add-on (SERVER) or /auction admin sell (ADMIN)getListing()
AuctionListingSoldEventNoA listing is bought from the menu (PLAYER) or with Quick Buy (QUICK_BUY)getListing(), getBuyerId(), getBuyerName()
AuctionListingRemoveEventNoThe seller (PLAYER) or staff (ADMIN) takes a listing downgetListing(), getRemovedById(), getRemovedByName(), isByStaff()
AuctionListingExpireEventNoA listing runs out of time (SERVER)getListing()
AuctionEarningsClaimEventNoA seller receives the money for a sold listing (manual claim or auto-claim), once per listinggetSellerId(), getSellerName(), getAmount(), getCurrencyProvider(), getCurrencyId(), getListings()

Order events​

Filtered by orders.enabled and orders.include-bot-orders in api.yml.

EventCancellableWhen firedKey getters
OrderCreateEventNoAn order is created (PLAYER, or SERVER for Random Orders add-on bot orders)getOrder()
OrderDeliverEventNoItems are delivered to an order, from menus (PLAYER), /sell (SELL_GUI) or the API (API)getOrder(), getItemId(), getItem(), getAmount(), getPayment(), getDelivererId(), getDelivererName(), isCompletesOrder()
OrderCompleteEventNoRight after the delivery that finishes the last item of an ordergetOrder()
OrderCancelEventNoAn order is cancelled by its ownergetOrder(), getRefund()
OrderExpireEventNoAn order runs out of time (SERVER)getOrder(), getRefund()
OrderCollectEventNoThe owner collects delivered itemsgetOrder(), getItemId(), getCollectorId(), getAmount()
OrderDeleteEventNoStaff (or the API) delete an order (ADMIN)getOrder(), getRefund()

Sell GUI event​

Filtered by sell-gui.enabled in api.yml. Fired by the Sell GUI add-on.

EventCancellableWhen firedKey getters
SellGuiSaleEventNoOnce per finished /sell, after everything was paid (SELL_GUI). The order deliveries also fire OrderDeliverEvent one by onegetPlayerId(), getPlayerName(), getOrderSales(), getServerSales(), getEarned(), getReturned()
  • getOrderSales() / getServerSales(): lists of Line(item, amount, pricePerItem, orderId); orderId is -1 and toOrder() false for items sold at the server price.
  • getEarned(): total per currency, keyed provider:currencyId (for example vault:default).
  • getReturned(): items handed back unsold (copies).

Snapshot types​

TypeFields
ListingInfo (record)id() (UUID), sellerId(), sellerName(), item() (copy, whole stack), price() (whole listing), currencyProvider(), currencyId(), kind() (PLAYER, BOT, ADMIN), isServerListing()
OrderInfo (record)id(), ownerId(), ownerName(), bot(), currencyProvider(), currencyId(), items()
OrderInfo.Item (record)id(), material(), amount(), delivered(), pricePerItem()

Without multi-currency, the currency is vault / default.