Add more events
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package com.alttd.playershops.events;
|
||||
|
||||
import com.alttd.playershops.shop.PlayerShop;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShopItemAmountChangeEvent extends ShopEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final int newAmount;
|
||||
|
||||
public ShopItemAmountChangeEvent(PlayerShop shop, int newAmount) {
|
||||
super(shop);
|
||||
this.newAmount = newAmount;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public int getNewAmount() {
|
||||
return newAmount;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.alttd.playershops.events;
|
||||
|
||||
import com.alttd.playershops.shop.PlayerShop;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShopItemChangeEvent extends ShopEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final ItemStack newItem;
|
||||
|
||||
public ShopItemChangeEvent(PlayerShop shop, ItemStack newItem) {
|
||||
super(shop);
|
||||
this.newItem = newItem;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ItemStack getNewItem() {
|
||||
return newItem;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.alttd.playershops.events;
|
||||
|
||||
import com.alttd.playershops.shop.PlayerShop;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShopPriceChangeEvent extends ShopEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final double newPrice;
|
||||
|
||||
public ShopPriceChangeEvent(PlayerShop shop, double newPrice) {
|
||||
super(shop);
|
||||
this.newPrice = newPrice;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public double getNewPrice() {
|
||||
return newPrice;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.alttd.playershops.events;
|
||||
|
||||
import com.alttd.playershops.shop.PlayerShop;
|
||||
import com.alttd.playershops.shop.ShopType;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ShopTypeChangeEvent extends ShopEvent {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final ShopType shopType;
|
||||
|
||||
public ShopTypeChangeEvent(PlayerShop shop, ShopType shopType) {
|
||||
super(shop);
|
||||
this.shopType = shopType;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public HandlerList getHandlers() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static HandlerList getHandlerList() {
|
||||
return handlers;
|
||||
}
|
||||
|
||||
public ShopType getShopType() {
|
||||
return shopType;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user