Added PlayerBucket events

This commit is contained in:
Erik Broes
2011-03-21 00:48:34 +01:00
parent a6a128197c
commit ae47996105
5 changed files with 146 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
package org.bukkit.event.player;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event.Type;
import org.bukkit.inventory.ItemStack;
public class PlayerBucketEmptyEvent extends PlayerEvent implements Cancellable {
ItemStack itemStack;
boolean cancelled = false;
Block blockClicked;
BlockFace blockFace;
Material bucket;
public PlayerBucketEmptyEvent(Player who, Block blockClicked, BlockFace blockFace, Material bucket, ItemStack itemInHand) {
super(Type.PLAYER_BUCKET_EMPTY, who);
this.blockClicked = blockClicked;
this.blockFace = blockFace;
this.itemStack = itemInHand;
this.bucket = bucket;
}
public Material getBucket() {
return bucket;
}
public ItemStack getItemStack() {
return itemStack;
}
public Block getBlockClicked() {
return blockClicked;
}
public BlockFace getBlockFace() {
return blockFace;
}
public void setItemStack(ItemStack itemStack) {
this.itemStack = itemStack;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancel) {
this.cancelled = cancel;
}
}