mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Implement PlayerPickupXpEvent, fired when a player aquires XP from a EntityXPOrb. Closes #942
This commit is contained in:
1 parent
2e47771860
commit
6c6f664c30
4 files changed
+52
-10
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package net.minecraftforge.event.entity.player;
|
||||
|
||||
import cpw.mods.fml.common.eventhandler.Cancelable;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* This event is called when a player collides with a EntityXPOrb on the ground.
|
||||
* The event can be canceled, and no further processing will be done.
|
||||
*/
|
||||
@Cancelable
|
||||
public class PlayerPickupXpEvent extends PlayerEvent
|
||||
{
|
||||
public final EntityXPOrb orb;
|
||||
|
||||
public PlayerPickupXpEvent(EntityPlayer player, EntityXPOrb orb)
|
||||
{
|
||||
super(player);
|
||||
this.orb = orb;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user