Reverting the Drop API for now, we need to re-evalute this as it is causing too many issues and blocking releases.
This reverts commit 2d17b0c24e2de982c09ad6050a95db0fac70c3ad. By: Warren Loo <evilseph@gmail.com>
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
package org.bukkit.event.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
/**
|
||||
* Called when a block is broken by a player.
|
||||
@@ -22,13 +19,11 @@ public class BlockBreakEvent extends BlockEvent implements Cancellable {
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
private final Player player;
|
||||
private boolean cancel;
|
||||
private List<ItemStack> drops;
|
||||
|
||||
public BlockBreakEvent(final Block theBlock, final Player player, List<ItemStack> drops) {
|
||||
public BlockBreakEvent(final Block theBlock, final Player player) {
|
||||
super(theBlock);
|
||||
this.player = player;
|
||||
this.cancel = false;
|
||||
this.drops = drops;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,16 +35,6 @@ public class BlockBreakEvent extends BlockEvent implements Cancellable {
|
||||
return player;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of items that should drop from this block. Modifying this list will modify the items drop.
|
||||
* If the block is a container, the contents of the container will not be included in this list. You can
|
||||
* get the contents of the container by casting the block's state.
|
||||
* @return A list of drops
|
||||
*/
|
||||
public List<ItemStack> getDrops() {
|
||||
return drops;
|
||||
}
|
||||
|
||||
public boolean isCancelled() {
|
||||
return cancel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user