mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +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 Player player;
|
||||
|
||||
/**
|
||||
* @param type
|
||||
* @param theBlock
|
||||
*/
|
||||
public BlockPlacedEvent(Type type, Block theBlock) {
|
||||
super(type, theBlock);
|
||||
cancel = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets the player who placed this block
|
||||
*
|
||||
* @return Player who placed the block
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
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() {
|
||||
// TODO Auto-generated method stub
|
||||
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) {
|
||||
this.cancel = cancel;
|
||||
}
|
||||
|
|
|
@ -14,12 +14,23 @@ public class ChunkUnloadedEvent extends ChunkLoadedEvent implements Cancellable
|
|||
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() {
|
||||
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) {
|
||||
this.cancel = cancel;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue