mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-04 22:41:33 +01:00
Bukkit R0.3 api updates.
This commit is contained in:
parent
968c849b13
commit
3d7d4a47d9
@ -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())
|
||||
{
|
||||
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user