1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-25 23:46:15 +02:00

why do we even remove the items?

derp
This commit is contained in:
snowleo
2013-02-17 15:34:49 +01:00
parent eff0561e8a
commit 6a67b400ec

View File

@@ -39,12 +39,11 @@ public class Commandhat extends EssentialsCommand
{
if (user.getItemInHand().getType() != Material.AIR)
{
final ItemStack hand = user.getItemInHand().clone();
final ItemStack hand = user.getItemInHand();
if (hand.getType().getMaxDurability() == 0)
{
final PlayerInventory inv = user.getInventory();
final ItemStack head = inv.getHelmet();
inv.removeItem(hand);
inv.setHelmet(hand);
inv.setItemInHand(head);
user.sendMessage(_("hatPlaced"));