Merge branch 'master' into seven
This commit is contained in:
@ -5,6 +5,7 @@ import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.FPlayer;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
import com.massivecraft.factions.struct.Rel;
|
||||
|
||||
@ -90,6 +91,7 @@ public class CmdOwner extends FCommand
|
||||
if (args.isEmpty() && myFaction.doesLocationHaveOwnersSet(flocation))
|
||||
{
|
||||
myFaction.clearClaimOwnership(flocation);
|
||||
SpoutFeatures.updateOwnerListLoc(flocation);
|
||||
fme.msg("<i>You have cleared ownership for this claimed area.");
|
||||
return;
|
||||
}
|
||||
@ -97,6 +99,7 @@ public class CmdOwner extends FCommand
|
||||
if (myFaction.isPlayerInOwnerList(playerName, flocation))
|
||||
{
|
||||
myFaction.removePlayerAsOwner(playerName, flocation);
|
||||
SpoutFeatures.updateOwnerListLoc(flocation);
|
||||
fme.msg("<i>You have removed ownership of this claimed land from %s<i>.", playerName);
|
||||
return;
|
||||
}
|
||||
@ -105,6 +108,8 @@ public class CmdOwner extends FCommand
|
||||
if ( ! payForCommand(Conf.econCostOwner, "to set ownership of claimed land", "for setting ownership of claimed land")) return;
|
||||
|
||||
myFaction.setPlayerAsOwner(playerName, flocation);
|
||||
SpoutFeatures.updateOwnerListLoc(flocation);
|
||||
|
||||
fme.msg("<i>You have added %s<i> to the owner list for this claimed land.", playerName);
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.FLocation;
|
||||
import com.massivecraft.factions.Faction;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
@ -38,6 +39,7 @@ public class CmdUnclaim extends FCommand
|
||||
if (Permission.MANAGE_SAFE_ZONE.has(sender))
|
||||
{
|
||||
Board.removeAt(flocation);
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(flocation);
|
||||
msg("<i>Safe zone was unclaimed.");
|
||||
}
|
||||
else
|
||||
@ -51,6 +53,7 @@ public class CmdUnclaim extends FCommand
|
||||
if (Permission.MANAGE_WAR_ZONE.has(sender))
|
||||
{
|
||||
Board.removeAt(flocation);
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(flocation);
|
||||
msg("<i>War zone was unclaimed.");
|
||||
}
|
||||
else
|
||||
@ -63,6 +66,7 @@ public class CmdUnclaim extends FCommand
|
||||
if (fme.isAdminBypassing())
|
||||
{
|
||||
Board.removeAt(flocation);
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(flocation);
|
||||
|
||||
otherFaction.msg("%s<i> unclaimed some of your land.", fme.describeTo(otherFaction, true));
|
||||
msg("<i>You unclaimed this land.");
|
||||
@ -148,6 +152,7 @@ public class CmdUnclaim extends FCommand
|
||||
}
|
||||
|
||||
Board.removeAt(flocation);
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(flocation);
|
||||
myFaction.msg("%s<i> unclaimed some land.", fme.describeTo(myFaction, true));
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.massivecraft.factions.cmd;
|
||||
import com.massivecraft.factions.Board;
|
||||
import com.massivecraft.factions.Conf;
|
||||
import com.massivecraft.factions.integration.Econ;
|
||||
import com.massivecraft.factions.integration.SpoutFeatures;
|
||||
import com.massivecraft.factions.struct.Permission;
|
||||
|
||||
public class CmdUnclaimall extends FCommand
|
||||
@ -27,18 +28,22 @@ public class CmdUnclaimall extends FCommand
|
||||
@Override
|
||||
public void perform()
|
||||
{
|
||||
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
||||
if(Conf.bankFactionPaysLandCosts)
|
||||
if (Econ.shouldBeUsed())
|
||||
{
|
||||
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! Econ.modifyMoney(fme , refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
||||
if(Conf.bankFactionPaysLandCosts)
|
||||
{
|
||||
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( ! Econ.modifyMoney(fme , refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||
}
|
||||
}
|
||||
|
||||
Board.unclaimAll(myFaction.getId());
|
||||
myFaction.msg("%s<i> unclaimed ALL of your faction's land.", fme.describeTo(myFaction, true));
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(null);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -76,6 +76,6 @@ public abstract class FRelationCommand extends FCommand
|
||||
}
|
||||
|
||||
SpoutFeatures.updateAppearances(myFaction, them);
|
||||
|
||||
SpoutFeatures.updateTerritoryDisplayLoc(null);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user