mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
why do we even remove the items?
derp
This commit is contained in:
parent
af10a2050a
commit
69e941670f
1 changed files with 1 additions and 2 deletions
|
@ -39,12 +39,11 @@ public class Commandhat extends EssentialsCommand
|
||||||
{
|
{
|
||||||
if (user.getItemInHand().getType() != Material.AIR)
|
if (user.getItemInHand().getType() != Material.AIR)
|
||||||
{
|
{
|
||||||
final ItemStack hand = user.getItemInHand().clone();
|
final ItemStack hand = user.getItemInHand();
|
||||||
if (hand.getType().getMaxDurability() == 0)
|
if (hand.getType().getMaxDurability() == 0)
|
||||||
{
|
{
|
||||||
final PlayerInventory inv = user.getInventory();
|
final PlayerInventory inv = user.getInventory();
|
||||||
final ItemStack head = inv.getHelmet();
|
final ItemStack head = inv.getHelmet();
|
||||||
inv.removeItem(hand);
|
|
||||||
inv.setHelmet(hand);
|
inv.setHelmet(hand);
|
||||||
inv.setItemInHand(head);
|
inv.setItemInHand(head);
|
||||||
user.sendMessage(_("hatPlaced"));
|
user.sendMessage(_("hatPlaced"));
|
||||||
|
|
Loading…
Reference in a new issue