mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 00:25:32 +01:00
Restore [free] and [disposal] signs back to their intended behaviour
This commit is contained in:
parent
c09329e5be
commit
5b930cdc3b
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user