From df9506ca9cc891931f51829377b4878484e24c74 Mon Sep 17 00:00:00 2001 From: ProSavage Date: Sun, 22 Jul 2018 11:33:53 -0500 Subject: [PATCH] /f unclaim fix --- src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java | 5 ++++- src/main/resources/plugin.yml | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java b/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java index c07d19b9..6be7cbae 100644 --- a/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java +++ b/src/main/java/com/massivecraft/factions/cmd/CmdUnclaim.java @@ -130,15 +130,17 @@ public class CmdUnclaim extends FCommand { } + if (targetFaction.getAccess(fme,PermissableAction.TERRITORY) == Access.DENY) { return false; } + if (!assertHasFaction()) { return false; } - if (targetFaction.getAccess(fme,PermissableAction.TERRITORY) != Access.ALLOW || !assertMinRole(Role.MODERATOR)) { + if (targetFaction.getAccess(fme, PermissableAction.TERRITORY) != Access.ALLOW && !assertMinRole(Role.MODERATOR)) { return false; } @@ -148,6 +150,7 @@ public class CmdUnclaim extends FCommand { return false; } + LandUnclaimEvent unclaimEvent = new LandUnclaimEvent(target, targetFaction, fme); Bukkit.getServer().getPluginManager().callEvent(unclaimEvent); if (unclaimEvent.isCancelled()) { diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f6da4c37..ac756903 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,5 +1,5 @@ name: Factions -version: ${project.version}-1.4-BETA-4 +version: ${project.version}-1.4-BETA-5 main: com.massivecraft.factions.P authors: [Olof Larsson, Brett Flannigan, drtshock, ProSavage] softdepend: [CoreProtect, PlayerVaults, PlaceholderAPI, MVdWPlaceholderAPI, PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag, dynmap, FactionsTop]