From b512734ab80d4b0489aff67db8c30f806e9cf6c3 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Thu, 22 Mar 2012 17:26:05 +0000 Subject: Bukkit R0.3 api updates. --- .../com/earth2me/essentials/commands/Commandbreak.java | 6 +++++- .../earth2me/essentials/craftbukkit/FakeInventory.java | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java index a03c24264..406230401 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbreak.java @@ -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 list = (List)block.getDrops(); + final BlockBreakEvent event = new BlockBreakEvent(block, user.getBase(), list); server.getPluginManager().callEvent(event); if (event.isCancelled()) { diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java index 01e7bd5b2..8456c956e 100644 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java +++ b/Essentials/src/com/earth2me/essentials/craftbukkit/FakeInventory.java @@ -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 iterator(int index) + { + throw new UnsupportedOperationException("Not supported yet."); + } } -- cgit v1.2.3