Interface PlayerEvent.DropItem

Enclosing interface:
PlayerEvent

public static interface PlayerEvent.DropItem
  • Method Summary

    Modifier and Type
    Method
    Description
    drop(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.item.ItemEntity entity)
    Invoked when a player drops an item.
  • Method Details

    • drop

      EventResult drop(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.item.ItemEntity entity)
      Invoked when a player drops an item. Equivalent to Forge's ItemTossEvent event.
      Parameters:
      player - The player dropping something.
      entity - The entity that has spawned when the player dropped a ItemStack.
      Returns:
      A EventResult determining the outcome of the event, the execution of the drop may be cancelled by the result.