Class DropItemStackAction


public class DropItemStackAction extends ItemStackAction
  • Constructor Details

    • DropItemStackAction

      public DropItemStackAction(int id, int count, boolean random, com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData source, com.nukkitx.protocol.bedrock.data.inventory.StackRequestSlotInfoData target)
  • Method Details

    • isValid

      public boolean isValid(CloudPlayer player)
      Description copied from class: InventoryAction
      Returns whether this action is currently valid. This should perform any necessary sanity checks.
      Specified by:
      isValid in class InventoryAction
      Parameters:
      player - player
      Returns:
      valid
    • execute

      public boolean execute(CloudPlayer player)
      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 class InventoryAction
      Parameters:
      player - player
      Returns:
      successfully executed
    • getContainers

      protected List<com.nukkitx.protocol.bedrock.packet.ItemStackResponsePacket.ContainerEntry> getContainers(CloudPlayer player)
      Specified by:
      getContainers in class ItemStackAction