Interface PlayerEvent.DropItem
- Enclosing interface:
- PlayerEvent
public static interface PlayerEvent.DropItem
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.InteractionResult
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
net.minecraft.world.InteractionResult 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'sItemTossEvent
event.- Parameters:
player
- The player dropping something.entity
- The entity that has spawned when the player dropped a ItemStack.- Returns:
- Forge ignores the return value. On Fabric a
InteractionResult.FAIL
results in the event getting canceled and the item not being dropped.
-