Fixed lag with claiming

This commit is contained in:
WhiteFoxHD 2019-05-12 02:32:54 -04:00 committed by GitHub
parent 8c6107859e
commit 135b961661
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;
@ -39,18 +38,13 @@ public class CmdClaim extends FCommand {
final Faction forFaction = this.argAsFaction(1, myFaction); // Default to own final Faction forFaction = this.argAsFaction(1, myFaction); // Default to own
if (!fme.isAdminBypassing()) { if (!fme.isAdminBypassing()) {
Access access = myFaction.getAccess(fme, PermissableAction.TERRITORY); Access access = myFaction.getAccess(fme, PermissableAction.CLAIM);
if (access != Access.ALLOW && fme.getRole() != Role.LEADER) { if (access != Access.ALLOW && fme.getRole() != Role.ADMIN) {
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);