Restore [free] and [disposal] signs back to their intended behaviour

This commit is contained in:
md_5 2012-03-15 20:48:41 +11:00
parent c09329e5be
commit 5b930cdc3b
2 changed files with 4 additions and 12 deletions

View File

@ -14,10 +14,7 @@ public class SignDisposal extends EssentialsSign
@Override
protected boolean onSignInteract(final ISign sign, final User player, final String username, final IEssentials ess)
{
player.sendMessage("Bukkit broke this sign :(");
//TODO: wait for a fix in bukkit
//Problem: Items can be duplicated
//player.getBase().openInventory(ess.getServer().createInventory(player, 36));
player.getBase().openInventory(ess.getServer().createInventory(player, 36));
return true;
}
}

View File

@ -35,14 +35,9 @@ public class SignFree extends EssentialsSign
}
item.setAmount(item.getType().getMaxStackSize());
InventoryWorkaround.addItem(player.getInventory(), true, item);
player.sendMessage("Item added to your inventory.");
player.updateInventory();
//TODO: wait for a fix in bukkit
//Problem: Items can be duplicated
//Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST);
//i.addItem(item);
//player.openInventory(i);
Inventory i = ess.getServer().createInventory(player, InventoryType.CHEST);
i.addItem(item);
player.openInventory(i);
Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess);
return true;
}