Bukkit R0.3 api updates.

This commit is contained in:
KHobbits 2012-03-22 17:26:05 +00:00
parent 968c849b13
commit 3d7d4a47d9
2 changed files with 23 additions and 1 deletions

View File

@ -2,10 +2,13 @@ package com.earth2me.essentials.commands;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.User;
import java.util.ArrayList;
import java.util.List;
import org.bukkit.Material;
import org.bukkit.Server;
import org.bukkit.block.Block;
import org.bukkit.event.block.BlockBreakEvent;
import org.bukkit.inventory.ItemStack;
public class Commandbreak extends EssentialsCommand
@ -32,7 +35,8 @@ public class Commandbreak extends EssentialsCommand
{
throw new Exception(_("noBreakBedrock"));
}
final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase());
final List<ItemStack> list = (List<ItemStack>)block.getDrops();
final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase(), list);
server.getPluginManager().callEvent(event);
if (event.isCancelled())
{

View File

@ -222,4 +222,22 @@ public class FakeInventory implements Inventory
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public int getMaxStackSize()
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public void setMaxStackSize(int size)
{
throw new UnsupportedOperationException("Not supported yet.");
}
@Override
public ListIterator<ItemStack> iterator(int index)
{
throw new UnsupportedOperationException("Not supported yet.");
}
}