Morph helmet fix
This commit is contained in:
parent
e558796268
commit
066dfbc9a9
@ -34,17 +34,6 @@ public abstract class MorphGadget extends Gadget
|
||||
|
||||
public void ApplyArmor(Player player)
|
||||
{
|
||||
Manager.RemoveArmor(player, _slot);
|
||||
|
||||
if (_slot == ArmorSlot.Helmet)
|
||||
player.getInventory().setHelmet(ItemStackFactory.Instance.CreateStack(GetDisplayMaterial(), GetDisplayData(), 1, F.item(GetName())));
|
||||
else if (_slot == ArmorSlot.Chest)
|
||||
player.getInventory().setChestplate(ItemStackFactory.Instance.CreateStack(GetDisplayMaterial(), GetDisplayData(), 1, F.item(GetName())));
|
||||
else if (_slot == ArmorSlot.Legs)
|
||||
player.getInventory().setLeggings(ItemStackFactory.Instance.CreateStack(GetDisplayMaterial(), GetDisplayData(), 1, F.item(GetName())));
|
||||
else if (_slot == ArmorSlot.Boots)
|
||||
player.getInventory().setBoots(ItemStackFactory.Instance.CreateStack(GetDisplayMaterial(), GetDisplayData(), 1, F.item(GetName())));
|
||||
|
||||
_active.add(player);
|
||||
|
||||
UtilPlayer.message(player, F.main("Gadget", "You put on " + F.elem(GetName()) + "."));
|
||||
@ -52,15 +41,6 @@ public abstract class MorphGadget extends Gadget
|
||||
|
||||
public void RemoveArmor(Player player)
|
||||
{
|
||||
if (_slot == ArmorSlot.Helmet)
|
||||
player.getInventory().setHelmet(null);
|
||||
else if (_slot == ArmorSlot.Chest)
|
||||
player.getInventory().setChestplate(null);
|
||||
else if (_slot == ArmorSlot.Legs)
|
||||
player.getInventory().setLeggings(null);
|
||||
else if (_slot == ArmorSlot.Boots)
|
||||
player.getInventory().setBoots(null);
|
||||
|
||||
if (_active.remove(player))
|
||||
UtilPlayer.message(player, F.main("Gadget", "You took off " + F.elem(GetName()) + "."));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user