Fixed HeadGetter overwriting item amount (#941)

This commit is contained in:
BONNe 2019-09-14 22:53:28 +03:00 committed by Florian CUNY
parent 115f434a30
commit fd5f4841b2

View File

@ -37,7 +37,7 @@ public class HeadGetter {
Iterator<Entry<String, PanelItem>> it = names.entrySet().iterator();
if (it.hasNext()) {
Entry<String, PanelItem> en = it.next();
ItemStack playerSkull = new ItemStack(Material.PLAYER_HEAD, 1);
ItemStack playerSkull = new ItemStack(Material.PLAYER_HEAD, en.getValue().getItem().getAmount());
SkullMeta meta = (SkullMeta) playerSkull.getItemMeta();
meta.setOwner(en.getKey());
playerSkull.setItemMeta(meta);