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