ForgePatch/common/net/minecraftforge/event/entity/item/ItemTossEvent.java
LexManos 03d1e51764 New EntityItem related events
Fixed player death event in SMP
Added Player specific drops event
Added generic EntityJoinWorldEvent
2012-09-11 15:27:34 -07:00

34 lines
No EOL
1,006 B
Java

package net.minecraftforge.event.entity.item;
import net.minecraft.src.EntityItem;
import net.minecraft.src.EntityPlayer;
import net.minecraftforge.event.Cancelable;
import net.minecraftforge.event.entity.EntityEvent;
/**
* Event that is fired whenever a player tosses (Q) an item or drag-n-drops a
* stack of items outside the inventory GUI screens. Canceling the event will
* stop the items from entering the world, but will not prevent them being
* removed from the inventory - and thus removed from the system.
*/
@Cancelable
public class ItemTossEvent extends ItemEvent
{
/**
* The player tossing the item.
*/
public final EntityPlayer player;
/**
* Creates a new event for EntityItems tossed by a player.
*
* @param entityItem The EntityItem being tossed.
* @param player The player tossing the item.
*/
public ItemTossEvent(EntityItem entityItem, EntityPlayer player)
{
super(entityItem);
this.player = player;
}
}