CrazyAuctions/paper/src/main/java/com/badbones69/crazyauctions/paper/api/events/AuctionListEvent.java

62 lines
1.5 KiB
Java
Raw Normal View History

2023-11-27 07:17:59 +01:00
package com.badbones69.crazyauctions.paper.api.events;
2023-11-27 07:17:59 +01:00
import com.badbones69.crazyauctions.paper.api.enums.ShopType;
import org.bukkit.entity.Player;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import org.bukkit.inventory.ItemStack;
/**
2023-08-21 20:06:07 +02:00
*
* @author BadBones69
*
* This event is fired when a new item is listed onto the auction house.
2023-08-21 20:06:07 +02:00
*
*/
public class AuctionListEvent extends Event {
2020-01-04 02:47:42 +01:00
2023-08-21 20:06:07 +02:00
private static final HandlerList handlers = new HandlerList();
2023-11-27 07:17:59 +01:00
private final Player player;
private final long price;
private final ShopType shop;
private final ItemStack item;
2020-01-04 02:47:42 +01:00
/**
2023-08-21 20:06:07 +02:00
*
2022-04-08 04:05:32 +02:00
* @param player The player who is listing the item.
* @param shop The shop type the item is being listed to.
* @param item The item being listed.
* @param price The price the item is being listed for.
2020-01-04 02:47:42 +01:00
*/
2023-08-21 20:06:07 +02:00
public AuctionListEvent(Player player, ShopType shop, ItemStack item, long price) {
2020-01-04 02:47:42 +01:00
this.player = player;
this.shop = shop;
this.item = item;
this.price = price;
}
2023-08-21 20:06:07 +02:00
public static HandlerList getHandlerList() {
return handlers;
}
2020-01-04 02:47:42 +01:00
public HandlerList getHandlers() {
return handlers;
}
public Player getPlayer() {
return player;
}
2023-08-21 20:06:07 +02:00
public ShopType getShopType() {
2020-01-04 02:47:42 +01:00
return shop;
}
public ItemStack getItem() {
return item;
}
public long getPrice() {
return price;
}
2023-08-21 20:06:07 +02:00
}