From d2e3e7c18c1f9e6936903acb44aebcebd1a02a33 Mon Sep 17 00:00:00 2001 From: novucs Date: Mon, 25 Jul 2016 15:07:03 +0100 Subject: [PATCH] Fire unclaim event when unclaiming Claim events fire even with bypass mode enabled, so the same functionality should apply for unclaiming. --- src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java b/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java index dfb18232..ef1eb4a8 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java @@ -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));