Add PLAYER_INTERACT, remove BLOCK_RIGHT_CLICK, BLOCK_INTERACT and PLAYER_ITEM
By: Erik Broes <erikbroes@ripe.net>
This commit is contained in:
@@ -213,7 +213,7 @@ public abstract class Event implements Serializable {
|
||||
*
|
||||
* @see org.bukkit.event.player.PlayerItemEvent
|
||||
*/
|
||||
PLAYER_ITEM (Category.PLAYER),
|
||||
PLAYER_INTERACT (Category.PLAYER),
|
||||
|
||||
/**
|
||||
* Called when a player throws an egg and it might hatch
|
||||
@@ -311,13 +311,6 @@ public abstract class Event implements Serializable {
|
||||
*/
|
||||
BLOCK_PHYSICS (Category.BLOCK),
|
||||
|
||||
/**
|
||||
* Called when a player is attempting to place a block
|
||||
*
|
||||
* @see org.bukkit.event.block.BlockRightClickEvent
|
||||
*/
|
||||
BLOCK_RIGHTCLICK (Category.BLOCK),
|
||||
|
||||
/**
|
||||
* Called when a player is attempting to place a block
|
||||
*
|
||||
@@ -325,13 +318,6 @@ public abstract class Event implements Serializable {
|
||||
*/
|
||||
BLOCK_PLACE (Category.BLOCK),
|
||||
|
||||
/**
|
||||
* Called when an entity interacts with a block (lever, door, pressure plate, chest, furnace)
|
||||
*
|
||||
* @see org.bukkit.event.block.BlockInteractEvent
|
||||
*/
|
||||
BLOCK_INTERACT (Category.BLOCK),
|
||||
|
||||
/**
|
||||
* Called when a block is destroyed from being burnt by fire
|
||||
*
|
||||
@@ -624,4 +610,26 @@ public abstract class Event implements Serializable {
|
||||
return category;
|
||||
}
|
||||
}
|
||||
|
||||
public enum Result {
|
||||
/**
|
||||
* Deny the event.
|
||||
* Depending on the event, the action indicated by the event will either not take place or will be reverted.
|
||||
* Some actions may not be denied.
|
||||
*/
|
||||
DENY,
|
||||
|
||||
/**
|
||||
* Neither deny nor allow the event.
|
||||
* The server will proceed with its normal handling.
|
||||
*/
|
||||
DEFAULT,
|
||||
|
||||
/**
|
||||
* Allow / Force the event.
|
||||
* The action indicated by the event will take place if possible, even if the server would not normally allow the action.
|
||||
* Some actions may not be allowed.
|
||||
*/
|
||||
ALLOW;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user