Class PlaceItemStackAction
java.lang.Object
org.cloudburstmc.server.inventory.transaction.action.InventoryAction
org.cloudburstmc.server.inventory.transaction.action.ItemStackAction
org.cloudburstmc.server.inventory.transaction.action.PlaceItemStackAction
-
Field Summary
Fields inherited from class org.cloudburstmc.server.inventory.transaction.action.InventoryAction
sourceItem, targetItem -
Constructor Summary
ConstructorsConstructorDescriptionPlaceItemStackAction(int id, int count, com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData source, com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData target) -
Method Summary
Modifier and TypeMethodDescriptionbooleanexecute(CloudPlayer player)Performs actions needed to complete the inventory-action server-side.booleanisValid(CloudPlayer player)Returns whether this action is currently valid.Methods inherited from class org.cloudburstmc.server.inventory.transaction.action.ItemStackAction
getSourceItem, getSourceSlot, getTargetItem, getTargetSlot, onAddToTransaction, onExecuteFail, onExecuteSuccessMethods inherited from class org.cloudburstmc.server.inventory.transaction.action.InventoryAction
getCreationTime, onPreExecute
-
Constructor Details
-
PlaceItemStackAction
public PlaceItemStackAction(int id, int count, com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData source, com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData target)
-
-
Method Details
-
isValid
Description copied from class:InventoryActionReturns whether this action is currently valid. This should perform any necessary sanity checks.- Specified by:
isValidin classInventoryAction- Parameters:
player- player- Returns:
- valid
-
execute
Description copied from class:InventoryActionPerforms 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:
executein classInventoryAction- Parameters:
player- player- Returns:
- successfully executed
-