Merge pull request #798 from novucs/1.6.x

Fire unclaim event when unclaiming
This commit is contained in:
Trent Hensler 2016-11-09 07:58:28 -08:00 committed by GitHub
commit a935cf6f06

View File

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