Fire unclaim event when unclaiming

Claim events fire even with bypass mode enabled, so the same functionality should apply for unclaiming.
This commit is contained in:
novucs 2016-07-25 15:07:03 +01:00
parent f2f06fe3e4
commit d2e3e7c18c

View File

@ -99,6 +99,12 @@ public class CmdUnclaim extends FCommand {
}
if (fme.isAdminBypassing()) {
LandUnclaimEvent unclaimEvent = new LandUnclaimEvent(target, targetFaction, fme);
Bukkit.getServer().getPluginManager().callEvent(unclaimEvent);
if (unclaimEvent.isCancelled()) {
return false;
}
Board.getInstance().removeAt(target);
targetFaction.msg(TL.COMMAND_UNCLAIM_UNCLAIMED, fme.describeTo(targetFaction, true));