mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-12-26 09:57:35 +01:00
5908eb67fa
- Copied utilities from ChestShop-4 - Made code really, really nicer to read - Made every external plugin's wrapper a listener, so it listens to events instead of being hard-coded.
38 lines
800 B
Java
38 lines
800 B
Java
package com.Acrobot.ChestShop.Events;
|
|
|
|
import org.bukkit.command.CommandSender;
|
|
import org.bukkit.event.Event;
|
|
import org.bukkit.event.HandlerList;
|
|
import org.bukkit.inventory.ItemStack;
|
|
|
|
/**
|
|
* @author Acrobot
|
|
*/
|
|
public class ItemInfoEvent extends Event {
|
|
private static final HandlerList handlers = new HandlerList();
|
|
|
|
private CommandSender sender;
|
|
private ItemStack item;
|
|
|
|
public ItemInfoEvent(CommandSender sender, ItemStack item) {
|
|
this.sender = sender;
|
|
this.item = item;
|
|
}
|
|
|
|
public CommandSender getSender() {
|
|
return sender;
|
|
}
|
|
|
|
public ItemStack getItem() {
|
|
return item;
|
|
}
|
|
|
|
public HandlerList getHandlers() {
|
|
return handlers;
|
|
}
|
|
|
|
public static HandlerList getHandlerList() {
|
|
return handlers;
|
|
}
|
|
}
|