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