mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-09-06 18:35:57 +00:00
Make sure items don't stack wrong in [free] signs.
This commit is contained in:
parent
b3de0aabae
commit
dddf529ff5
|
@ -34,10 +34,12 @@ public class SignFree extends EssentialsSign
|
|||
throw new SignException(_("cantSpawnItem", "Air"));
|
||||
}
|
||||
|
||||
item.setAmount(item.getType().getMaxStackSize() * 36);
|
||||
Inventory i = ess.getServer().createInventory(player, 36);
|
||||
i.addItem(item);
|
||||
player.openInventory(i);
|
||||
item.setAmount(item.getType().getMaxStackSize());
|
||||
Inventory invent = ess.getServer().createInventory(player, 36);
|
||||
for (int i = 0; i < 36; i++) {
|
||||
invent.addItem(item);
|
||||
}
|
||||
player.openInventory(invent);
|
||||
Trade.log("Sign", "Free", "Interact", username, null, username, new Trade(item, ess), sign.getBlock().getLocation(), ess);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue