removed testing toggle for mount
changed item gadget slot from 2 to 3
This commit is contained in:
parent
f838452b5c
commit
55de25fded
@ -38,7 +38,7 @@ public abstract class ItemGadget extends Gadget
|
|||||||
{
|
{
|
||||||
Manager.RemoveItem(player);
|
Manager.RemoveItem(player);
|
||||||
|
|
||||||
player.getInventory().setItem(2, ItemStackFactory.Instance.CreateStack(_material, _data, 1, F.item(GetName())));
|
player.getInventory().setItem(3, ItemStackFactory.Instance.CreateStack(_material, _data, 1, F.item(GetName())));
|
||||||
|
|
||||||
_active.add(player);
|
_active.add(player);
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ public abstract class ItemGadget extends Gadget
|
|||||||
|
|
||||||
public void RemoveItem(Player player)
|
public void RemoveItem(Player player)
|
||||||
{
|
{
|
||||||
player.getInventory().setItem(2, null);
|
player.getInventory().setItem(3, null);
|
||||||
|
|
||||||
_active.remove(player);
|
_active.remove(player);
|
||||||
|
|
||||||
|
@ -65,20 +65,4 @@ public class Undead extends Mount
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
|
||||||
public void Toggle(PlayerToggleSneakEvent event)
|
|
||||||
{
|
|
||||||
if (event.getPlayer().isSneaking())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (IsActive(event.getPlayer()))
|
|
||||||
{
|
|
||||||
this.Disable(event.getPlayer());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.Enable(event.getPlayer());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user