mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-12-05 00:23:22 +01:00
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:
parent
f2f06fe3e4
commit
d2e3e7c18c
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user