mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Javadoc
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
7f944f0a0d
commit
740077970e
2 changed files with 30 additions and 7 deletions
|
@ -11,24 +11,36 @@ public class BlockPlacedEvent extends BlockEvent implements Cancellable {
|
||||||
private boolean cancel;
|
private boolean cancel;
|
||||||
private Player player;
|
private Player player;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param type
|
|
||||||
* @param theBlock
|
|
||||||
*/
|
|
||||||
public BlockPlacedEvent(Type type, Block theBlock) {
|
public BlockPlacedEvent(Type type, Block theBlock) {
|
||||||
super(type, theBlock);
|
super(type, theBlock);
|
||||||
cancel = false;
|
cancel = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the player who placed this block
|
||||||
|
*
|
||||||
|
* @return Player who placed the block
|
||||||
|
*/
|
||||||
public Player getPlayer() {
|
public Player getPlayer() {
|
||||||
return player;
|
return player;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the cancellation state of this event. A cancelled event will not
|
||||||
|
* be executed in the server, but will still pass to other plugins
|
||||||
|
*
|
||||||
|
* @return true if this event is cancelled
|
||||||
|
*/
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return cancel;
|
return cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the cancellation state of this event. A cancelled event will not
|
||||||
|
* be executed in the server, but will still pass to other plugins
|
||||||
|
*
|
||||||
|
* @param cancel true if you wish to cancel this event
|
||||||
|
*/
|
||||||
public void setCancelled(boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
this.cancel = cancel;
|
this.cancel = cancel;
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,23 @@ public class ChunkUnloadedEvent extends ChunkLoadedEvent implements Cancellable
|
||||||
super(type, chunk);
|
super(type, chunk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the cancellation state of this event. A cancelled event will not
|
||||||
|
* be executed in the server, but will still pass to other plugins
|
||||||
|
*
|
||||||
|
* @return true if this event is cancelled
|
||||||
|
*/
|
||||||
public boolean isCancelled() {
|
public boolean isCancelled() {
|
||||||
return cancel;
|
return cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the cancellation state of this event. A cancelled event will not
|
||||||
|
* be executed in the server, but will still pass to other plugins
|
||||||
|
*
|
||||||
|
* @param cancel true if you wish to cancel this event
|
||||||
|
*/
|
||||||
public void setCancelled(boolean cancel) {
|
public void setCancelled(boolean cancel) {
|
||||||
this.cancel = cancel;
|
this.cancel = cancel;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue