mirror of https://github.com/Minestom/Minestom.git
38 lines
854 B
Java
38 lines
854 B
Java
package fr.themode.minestom.event;
|
|
|
|
import fr.themode.minestom.utils.BlockPosition;
|
|
|
|
public class PlayerBlockBreakEvent extends CancellableEvent {
|
|
|
|
private BlockPosition blockPosition;
|
|
|
|
private short blockId;
|
|
private boolean customBlock;
|
|
|
|
public PlayerBlockBreakEvent(BlockPosition blockPosition) {
|
|
this.blockPosition = blockPosition;
|
|
}
|
|
|
|
public BlockPosition getBlockPosition() {
|
|
return blockPosition;
|
|
}
|
|
|
|
public short getResultBlock() {
|
|
return blockId;
|
|
}
|
|
|
|
public void setResultBlock(short blockId) {
|
|
this.blockId = blockId;
|
|
this.customBlock = false;
|
|
}
|
|
|
|
public boolean isResultCustomBlock() {
|
|
return customBlock;
|
|
}
|
|
|
|
public void setResultCustomBlock(short customBlockId) {
|
|
this.blockId = customBlockId;
|
|
this.customBlock = true;
|
|
}
|
|
}
|