public class DropItemAction extends InventoryAction
sourceItem, targetItem| Constructor and Description |
|---|
DropItemAction(Item source,
Item target) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
execute(Player source)
Drops the target item in front of the player.
|
boolean |
isValid(Player source)
Verifies that the source item of a drop-item action must be air.
|
void |
onExecuteFail(Player source)
Performs additional actions when this inventory-action did not complete successfully.
|
void |
onExecuteSuccess(Player source)
Performs additional actions when this inventory-action completed successfully.
|
boolean |
onPreExecute(Player source)
Called by inventory transactions before any actions are processed.
|
getCreationTime, getSourceItem, getTargetItem, onAddToTransactionpublic boolean isValid(Player source)
isValid in class InventoryActionsource - playerpublic boolean onPreExecute(Player source)
InventoryActiononPreExecute in class InventoryActionsource - playerpublic boolean execute(Player source)
execute in class InventoryActionsource - playerpublic void onExecuteSuccess(Player source)
InventoryActiononExecuteSuccess in class InventoryActionsource - playerpublic void onExecuteFail(Player source)
InventoryActiononExecuteFail in class InventoryActionsource - playerCopyright © 2020. All rights reserved.