Added events for endermen pickup/placement blocks and methods to get/set the block that an enderman is holding. Thanks Wizjany

This commit is contained in:
Wizjany
2011-09-17 20:18:43 -04:00
committed by Dinnerbone
parent 186db4d956
commit bed0cc340b
6 changed files with 126 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
package org.bukkit.event.entity;
import org.bukkit.block.Block;
import org.bukkit.entity.Entity;
import org.bukkit.event.Cancellable;
public class EndermanPickupEvent extends EntityEvent implements Cancellable {
private boolean cancel;
private Block block;
public EndermanPickupEvent(Entity what, Block block) {
super(Type.ENDERMAN_PICKUP, what);
this.block = block;
this.cancel = false;
}
public boolean isCancelled() {
return cancel;
}
public void setCancelled(boolean cancel) {
this.cancel = cancel;
}
/**
* Get the block that the enderman is going to pick up.
*
* @return block the enderman is about to pick up
*/
public Block getBlock() {
return block;
}
}