Merge pull request #158 from ProSavage/claim-lag-fix

Claim lag fix
This commit is contained in:
Naman 2019-05-12 09:45:36 -05:00 committed by GitHub
commit 4681974fee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,6 @@ package com.massivecraft.factions.cmd;
import com.massivecraft.factions.Conf; import com.massivecraft.factions.Conf;
import com.massivecraft.factions.FLocation; import com.massivecraft.factions.FLocation;
import com.massivecraft.factions.Faction; import com.massivecraft.factions.Faction;
import com.massivecraft.factions.SavageFactions;
import com.massivecraft.factions.struct.Permission; import com.massivecraft.factions.struct.Permission;
import com.massivecraft.factions.struct.Role; import com.massivecraft.factions.struct.Role;
import com.massivecraft.factions.util.SpiralTask; import com.massivecraft.factions.util.SpiralTask;
@ -41,16 +40,11 @@ public class CmdClaim extends FCommand {
if (!fme.isAdminBypassing()) { if (!fme.isAdminBypassing()) {
Access access = myFaction.getAccess(fme, PermissableAction.TERRITORY); Access access = myFaction.getAccess(fme, PermissableAction.TERRITORY);
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) { if (access != Access.ALLOW && fme.getRole() != Role.LEADER) {
fme.msg(TL.GENERIC_FPERM_NOPERMISSION, "change faction territory"); fme.msg(TL.GENERIC_NOPERMISSION, "change faction territory");
return; return;
} }
} }
if (forFaction.isWilderness()) {
CmdUnclaim cmdUnclaim = SavageFactions.plugin.cmdBase.cmdUnclaim;
cmdUnclaim.execute(sender, args.size() > 1 ? args.subList(0, 1) : args);
return;
}
if (radius < 1) { if (radius < 1) {
msg(TL.COMMAND_CLAIM_INVALIDRADIUS); msg(TL.COMMAND_CLAIM_INVALIDRADIUS);