Disable sortals is the gadget gets disabled

This commit is contained in:
Sam 2018-07-31 21:22:48 +01:00 committed by Alexander Meech
parent 7591f7da18
commit 689aebedd8

View File

@ -73,6 +73,20 @@ public class ItemSortal extends ItemGadget
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
public void adminCommand(PlayerCommandPreprocessEvent event)
{