mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-13 01:54:25 +02:00
Use the new Workaround in buy signs.
This commit is contained in:
@@ -33,7 +33,7 @@ public class SignBuy extends EssentialsSign
|
|||||||
item.setAmount(amount);
|
item.setAmount(amount);
|
||||||
final Charge charge = getCharge(sign, 3, ess);
|
final Charge charge = getCharge(sign, 3, ess);
|
||||||
charge.isAffordableFor(player);
|
charge.isAffordableFor(player);
|
||||||
final Map<Integer, ItemStack> leftOver = player.getInventory().addItem(item);
|
final Map<Integer, ItemStack> leftOver = InventoryWorkaround.addItem(player.getInventory(), true, item);
|
||||||
for (ItemStack itemStack : leftOver.values())
|
for (ItemStack itemStack : leftOver.values())
|
||||||
{
|
{
|
||||||
InventoryWorkaround.dropItem(player.getLocation(), itemStack);
|
InventoryWorkaround.dropItem(player.getLocation(), itemStack);
|
||||||
|
Reference in New Issue
Block a user