Disable sortals is the gadget gets disabled
This commit is contained in:
parent
7591f7da18
commit
689aebedd8
|
@ -73,6 +73,20 @@ public class ItemSortal extends ItemGadget
|
||||||
createAndFire(player, player.getLocation().add(0, 3, 0), 20);
|
createAndFire(player, player.getLocation().add(0, 3, 0), 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void disableCustom(Player player, boolean message)
|
||||||
|
{
|
||||||
|
super.disableCustom(player, message);
|
||||||
|
|
||||||
|
_sortals.forEach(sortal ->
|
||||||
|
{
|
||||||
|
if (sortal.Wielder.equals(player))
|
||||||
|
{
|
||||||
|
sortal.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void adminCommand(PlayerCommandPreprocessEvent event)
|
public void adminCommand(PlayerCommandPreprocessEvent event)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue