cn.nukkit.event.block.BlockPlaceEvent 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.block;
import cn.nukkit.Player;
import cn.nukkit.block.Block;
import cn.nukkit.event.Cancellable;
import cn.nukkit.event.HandlerList;
import cn.nukkit.item.Item;
/**
* @author MagicDroidX (Nukkit Project)
*/
public class BlockPlaceEvent extends BlockEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
public static HandlerList getHandlers() {
return handlers;
}
protected final Player player;
protected final Item item;
protected final Block blockReplace;
protected final Block blockAgainst;
public BlockPlaceEvent(Player player, Block blockPlace, Block blockReplace, Block blockAgainst, Item item) {
super(blockPlace);
this.blockReplace = blockReplace;
this.blockAgainst = blockAgainst;
this.item = item;
this.player = player;
}
public Player getPlayer() {
return player;
}
public Item getItem() {
return item;
}
public Block getBlockReplace() {
return blockReplace;
}
public Block getBlockAgainst() {
return blockAgainst;
}
}