@@ -19,9 +19,9 @@ public class BlockBreakEvent extends BlockEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the player doing the damage
|
||||
* Gets the Player that is breaking the block
|
||||
*
|
||||
* @return the Player doing the damage
|
||||
* @return the Player that is breaking the block
|
||||
*/
|
||||
public Player getPlayer() {
|
||||
return player;
|
||||
|
||||
@@ -6,7 +6,7 @@ import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Called when a block is damaged by a player
|
||||
* Called when a block is damaged (hit by a player)
|
||||
*/
|
||||
public class BlockDamageEvent extends BlockEvent implements Cancellable {
|
||||
private Player player;
|
||||
|
||||
@@ -59,14 +59,20 @@ public class BlockDispenseEvent extends BlockEvent implements Cancellable {
|
||||
}
|
||||
|
||||
/**
|
||||
* Check to see if the event was cancelled.
|
||||
* 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 cancelled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent dispensing.
|
||||
* 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) {
|
||||
cancelled = cancel;
|
||||
|
||||
@@ -41,6 +41,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
*
|
||||
* @param index index of the line to get
|
||||
* @return String line
|
||||
* @throws IndexOutOfBoundsException
|
||||
*/
|
||||
public String getLine(int index) throws IndexOutOfBoundsException {
|
||||
return lines[index];
|
||||
@@ -51,6 +52,7 @@ public class SignChangeEvent extends BlockEvent implements Cancellable {
|
||||
*
|
||||
* @param index index of the line to set
|
||||
* @param line text to set
|
||||
* @throws IndexOutOfBoundsException
|
||||
*/
|
||||
public void setLine(int index, String line) throws IndexOutOfBoundsException {
|
||||
lines[index] = line;
|
||||
|
||||
Reference in New Issue
Block a user