mirror of
https://github.com/essentials/Essentials.git
synced 2025-09-25 21:59:08 +02:00
Make sure items don't stack wrong in [free] signs.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user