cn.nukkit.event.player.PlayerBucketEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powernukkit Show documentation
Show all versions of powernukkit Show documentation
A Minecraft Bedrock Edition server software implementation made in Java from scratch which supports all new features.
package cn.nukkit.event.player;
import cn.nukkit.Player;
import cn.nukkit.block.Block;
import cn.nukkit.event.Cancellable;
import cn.nukkit.item.Item;
import cn.nukkit.math.BlockFace;
abstract class PlayerBucketEvent extends PlayerEvent implements Cancellable {
private final Block blockClicked;
private final BlockFace blockFace;
private final Block liquid;
private final Item bucket;
private Item item;
public PlayerBucketEvent(Player who, Block blockClicked, BlockFace blockFace, Block liquid, Item bucket, Item itemInHand) {
this.player = who;
this.blockClicked = blockClicked;
this.blockFace = blockFace;
this.liquid = liquid;
this.item = itemInHand;
this.bucket = bucket;
}
/**
* Returns the bucket used in this event
* @return bucket
*/
public Item getBucket() {
return this.bucket;
}
/**
* Returns the item in hand after the event
* @return item
*/
public Item getItem() {
return this.item;
}
public void setItem(Item item) {
this.item = item;
}
public Block getBlockClicked() {
return this.blockClicked;
}
public BlockFace getBlockFace() {
return this.blockFace;
}
}