mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-20 07:17:34 +01:00
1bf4651efa
- Added ShopDestroyedEvent - Fixed signs stacked on each other not working - Fixed Admin Shops selling materials with metadata - Fixed shops accepting '0' quantity - Started working on database stuff - Split BlockBreak listener to many files - Added methods to InventoryUtil - Fixed discounts
54 lines
1.1 KiB
Java
54 lines
1.1 KiB
Java
package com.Acrobot.ChestShop.Events;
|
|
|
|
import org.bukkit.block.Chest;
|
|
import org.bukkit.block.Sign;
|
|
import org.bukkit.entity.Player;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class ShopCreatedEvent extends Event {
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
private Player player;
|
|
|
|
private Sign sign;
|
|
private Chest chest;
|
|
private String[] signLines;
|
|
|
|
public ShopCreatedEvent(Player player, Sign sign, @Nullable Chest chest, String[] signLines) {
|
|
this.player = player;
|
|
this.sign = sign;
|
|
this.chest = chest;
|
|
this.signLines = signLines.clone();
|
|
}
|
|
|
|
public String[] getSignLines() {
|
|
return signLines;
|
|
}
|
|
|
|
public Player getPlayer() {
|
|
return player;
|
|
}
|
|
|
|
public Sign getSign() {
|
|
return sign;
|
|
}
|
|
|
|
@Nullable public Chest getChest() {
|
|
return chest;
|
|
}
|
|
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
}
|