Class NoOpIventoryAction
java.lang.Object
cn.nukkit.inventory.transaction.action.InventoryAction
cn.nukkit.inventory.transaction.action.NoOpIventoryAction
- Direct Known Subclasses:
EnchantingAction
,RepairItemAction
- Since:
- 2021-12-11
- Author:
- joserobjr
-
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.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.Methods inherited from class cn.nukkit.inventory.transaction.action.InventoryAction
getCreationTime, getSourceItem, getTargetItem, isValid, onAddToTransaction, onPreExecute, toString
-
Constructor Details
-
NoOpIventoryAction
-
-
Method Details
-
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
-