Class CraftingTakeResultAction
java.lang.Object
cn.nukkit.inventory.transaction.action.InventoryAction
cn.nukkit.inventory.transaction.action.CraftingTakeResultAction
- Direct Known Subclasses:
CraftingTakeResultExperienceAction
- Author:
- CreeperFace
-
Field Summary
Fields inherited from class cn.nukkit.inventory.transaction.action.InventoryAction
sourceItem, targetItem
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Performs actions needed to complete the inventory-action server-side.boolean
Returns whether this action is currently valid.void
onAddToTransaction
(InventoryTransaction transaction) Called when the action is added to the specified InventoryTransaction.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.toString()
Methods inherited from class cn.nukkit.inventory.transaction.action.InventoryAction
getCreationTime, getSourceItem, getTargetItem, onPreExecute
-
Constructor Details
-
CraftingTakeResultAction
-
-
Method Details
-
onAddToTransaction
Description copied from class:InventoryAction
Called when the action is added to the specified InventoryTransaction.- Overrides:
onAddToTransaction
in classInventoryAction
- Parameters:
transaction
- to add
-
isValid
Description copied from class:InventoryAction
Returns whether this action is currently valid. This should perform any necessary sanity checks.- Specified by:
isValid
in classInventoryAction
- Parameters:
source
- player- Returns:
- valid
-
execute
Description copied from class:InventoryAction
Performs actions needed to complete the inventory-action server-side. Returns if it was successful. Will return false if plugins cancelled events. This will only be called if the transaction which it is part of is considered valid.- Specified by:
execute
in classInventoryAction
- Parameters:
source
- player- Returns:
- successfully executed
-
onExecuteSuccess
Description copied from class:InventoryAction
Performs additional actions when this inventory-action completed successfully.- Specified by:
onExecuteSuccess
in classInventoryAction
- Parameters:
$source
- player
-
onExecuteFail
Description copied from class:InventoryAction
Performs additional actions when this inventory-action did not complete successfully.- Specified by:
onExecuteFail
in classInventoryAction
- Parameters:
source
- player
-
toString
- Overrides:
toString
in classInventoryAction
-