Make LandUnclaimAllEvent Cancellable

This commit is contained in:
eueln
2014-12-17 20:50:24 -06:00
parent 3733539077
commit 3c2e51e8ed
2 changed files with 16 additions and 2 deletions

View File

@@ -44,7 +44,9 @@ public class CmdUnclaimall extends FCommand {
LandUnclaimAllEvent unclaimAllEvent = new LandUnclaimAllEvent(myFaction, fme);
Bukkit.getServer().getPluginManager().callEvent(unclaimAllEvent);
// this event cannot be cancelled
if (unclaimAllEvent.isCancelled()) {
return;
}
Board.getInstance().unclaimAll(myFaction.getId());
myFaction.msg(TL.COMMAND_UNCLAIMALL_UNCLAIMED, fme.describeTo(myFaction, true));