2012-05-10 16:32:25 +02:00
|
|
|
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;
|
|
|
|
|
2012-10-16 17:03:45 +02:00
|
|
|
import javax.annotation.Nullable;
|
|
|
|
|
2012-05-10 16:32:25 +02:00
|
|
|
/**
|
|
|
|
* @author Acrobot
|
|
|
|
*/
|
|
|
|
public class ShopCreatedEvent extends Event {
|
|
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
|
2013-01-15 21:33:00 +01:00
|
|
|
private final Player creator;
|
2012-10-16 17:03:45 +02:00
|
|
|
|
2013-01-15 21:33:00 +01:00
|
|
|
private final Sign sign;
|
|
|
|
private final String[] signLines;
|
|
|
|
@Nullable private final Chest chest;
|
2012-05-10 16:32:25 +02:00
|
|
|
|
2013-01-15 21:33:00 +01:00
|
|
|
public ShopCreatedEvent(Player creator, Sign sign, @Nullable Chest chest, String[] signLines) {
|
|
|
|
this.creator = creator;
|
2012-05-10 16:32:25 +02:00
|
|
|
this.sign = sign;
|
|
|
|
this.chest = chest;
|
2012-06-08 15:28:36 +02:00
|
|
|
this.signLines = signLines.clone();
|
2012-05-10 16:32:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public String[] getSignLines() {
|
|
|
|
return signLines;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Player getPlayer() {
|
2013-01-15 21:33:00 +01:00
|
|
|
return creator;
|
2012-05-10 16:32:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public Sign getSign() {
|
|
|
|
return sign;
|
|
|
|
}
|
|
|
|
|
2012-10-16 17:03:45 +02:00
|
|
|
@Nullable public Chest getChest() {
|
2012-05-10 16:32:25 +02:00
|
|
|
return chest;
|
|
|
|
}
|
|
|
|
|
|
|
|
public HandlerList getHandlers() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static HandlerList getHandlerList() {
|
|
|
|
return handlers;
|
|
|
|
}
|
|
|
|
}
|