mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-22 22:34:43 +02:00
why do we even remove the items?
derp
This commit is contained in:
@@ -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"));
|
||||||
|
Reference in New Issue
Block a user