mirror of
https://github.com/KAMKEEL/CustomNPC-Plus-API.git
synced 2026-11-14 02:34:15 +00:00
Create IAuctionEvent.java
This commit is contained in:
1 parent
28c0ca840f
commit
ae4b84f3ba
1 file changed
+75
@@ -0,0 +1,75 @@
|
||||
package noppes.npcs.api.event;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import noppes.npcs.api.handler.data.IAuctionClaim;
|
||||
import noppes.npcs.api.handler.data.IAuctionListing;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
|
||||
/**
|
||||
* Events related to auction actions.
|
||||
* These events are fired when players interact with the auction system.
|
||||
*/
|
||||
public interface IAuctionEvent extends IPlayerEvent {
|
||||
|
||||
/**
|
||||
* Fired before a player creates a new auction listing.
|
||||
* Cancel to prevent the listing from being created.
|
||||
* The listing fee has NOT yet been deducted when this fires.
|
||||
*
|
||||
* @hookName auctionCreate
|
||||
*/
|
||||
@Cancelable
|
||||
interface CreateEvent extends IAuctionEvent {
|
||||
IItemStack getItem();
|
||||
long getStartingPrice();
|
||||
long getBuyoutPrice();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired before a player places a bid on an auction.
|
||||
* Cancel to prevent the bid from being placed.
|
||||
* Currency has NOT yet been deducted when this fires.
|
||||
*
|
||||
* @hookName auctionBid
|
||||
*/
|
||||
@Cancelable
|
||||
interface BidEvent extends IAuctionEvent {
|
||||
IAuctionListing getListing();
|
||||
long getBidAmount();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired before a player buys out an auction.
|
||||
* Cancel to prevent the buyout.
|
||||
* Currency has NOT yet been deducted when this fires.
|
||||
*
|
||||
* @hookName auctionBuyout
|
||||
*/
|
||||
@Cancelable
|
||||
interface BuyoutEvent extends IAuctionEvent {
|
||||
IAuctionListing getListing();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired before a player cancels an auction listing.
|
||||
* Cancel to prevent the cancellation.
|
||||
*
|
||||
* @hookName auctionCancel
|
||||
*/
|
||||
@Cancelable
|
||||
interface CancelEvent extends IAuctionEvent {
|
||||
IAuctionListing getListing();
|
||||
boolean isAdmin();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired before a player claims an item or currency from an auction.
|
||||
* Cancel to prevent the claim.
|
||||
*
|
||||
* @hookName auctionClaim
|
||||
*/
|
||||
@Cancelable
|
||||
interface ClaimEvent extends IAuctionEvent {
|
||||
IAuctionClaim getClaim();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user