Interface PlayerEvent.DropItem
- Enclosing interface:
- PlayerEvent
public static interface PlayerEvent.DropItem
-
Method Summary
Modifier and TypeMethodDescriptiondrop(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'sItemTossEventevent.- Parameters:
player- The player dropping something.entity- The entity that has spawned when the player dropped a ItemStack.- Returns:
- A
EventResultdetermining the outcome of the event, the execution of the drop may be cancelled by the result.
-