Merge branch 'master' of github.com:MassiveCraft/Factions
This commit is contained in:
commit
fc6bfcf061
BIN
lib/SpoutAPI.jar
BIN
lib/SpoutAPI.jar
Binary file not shown.
@ -608,7 +608,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
|
|||||||
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
|
double cost = Econ.calculateClaimCost(ownedLand, currentFaction.isNormal());
|
||||||
//String costString = Econ.moneyString(cost);
|
//String costString = Econ.moneyString(cost);
|
||||||
|
|
||||||
if(Conf.bankFactionPaysLandCosts && this.hasFaction())
|
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts && this.hasFaction())
|
||||||
{
|
{
|
||||||
Faction faction = this.getFaction();
|
Faction faction = this.getFaction();
|
||||||
if ( ! Econ.modifyMoney(faction, -cost, "to claim this land", "for claiming this land")) return false;
|
if ( ! Econ.modifyMoney(faction, -cost, "to claim this land", "for claiming this land")) return false;
|
||||||
|
@ -92,7 +92,7 @@ public class Faction extends Entity implements EconomyParticipator
|
|||||||
if ( ! Econ.getMethod().createAccount(aid))
|
if ( ! Econ.getMethod().createAccount(aid))
|
||||||
{
|
{
|
||||||
P.p.log(Level.SEVERE, "Error creating faction bank account through Register: "+aid);
|
P.p.log(Level.SEVERE, "Error creating faction bank account through Register: "+aid);
|
||||||
return null;
|
// return null;
|
||||||
}
|
}
|
||||||
MethodAccount acc = Econ.getMethod().getAccount(aid);
|
MethodAccount acc = Econ.getMethod().getAccount(aid);
|
||||||
acc.set(0);
|
acc.set(0);
|
||||||
|
@ -38,7 +38,7 @@ public class CmdDescription extends FCommand
|
|||||||
for (FPlayer fplayer : FPlayers.i.getOnline())
|
for (FPlayer fplayer : FPlayers.i.getOnline())
|
||||||
{
|
{
|
||||||
fplayer.msg("<h>%s<i> changed their description to:", myFaction.describeTo(fplayer));
|
fplayer.msg("<h>%s<i> changed their description to:", myFaction.describeTo(fplayer));
|
||||||
fplayer.msg("<h>"+myFaction.getDescription());
|
fplayer.msg("<i>"+myFaction.getDescription());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ public class CmdUnclaim extends FCommand
|
|||||||
{
|
{
|
||||||
double refund = Econ.calculateClaimRefund(myFaction.getLandRounded());
|
double refund = Econ.calculateClaimRefund(myFaction.getLandRounded());
|
||||||
|
|
||||||
if(Conf.bankFactionPaysLandCosts)
|
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts)
|
||||||
{
|
{
|
||||||
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim this land", "for unclaiming this land")) return;
|
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim this land", "for unclaiming this land")) return;
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@ public class CmdUnclaimall extends FCommand
|
|||||||
if (Econ.shouldBeUsed())
|
if (Econ.shouldBeUsed())
|
||||||
{
|
{
|
||||||
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
double refund = Econ.calculateTotalLandRefund(myFaction.getLandRounded());
|
||||||
if(Conf.bankFactionPaysLandCosts)
|
if(Conf.bankEnabled && Conf.bankFactionPaysLandCosts)
|
||||||
{
|
{
|
||||||
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
if ( ! Econ.modifyMoney(myFaction, refund, "to unclaim all faction land", "for unclaiming all faction land")) return;
|
||||||
}
|
}
|
||||||
|
@ -389,7 +389,7 @@ public abstract class FCommand extends MCommand<P>
|
|||||||
{
|
{
|
||||||
if ( ! Econ.shouldBeUsed() || this.fme == null || cost == 0.0 || fme.hasAdminMode()) return true;
|
if ( ! Econ.shouldBeUsed() || this.fme == null || cost == 0.0 || fme.hasAdminMode()) return true;
|
||||||
|
|
||||||
if(Conf.bankFactionPaysLandCosts && fme.hasFaction())
|
if(Conf.bankEnabled && Conf.bankFactionPaysCosts && fme.hasFaction())
|
||||||
{
|
{
|
||||||
if ( ! Econ.modifyMoney(myFaction, -cost, toDoThis, forDoingThis)) return false;
|
if ( ! Econ.modifyMoney(myFaction, -cost, toDoThis, forDoingThis)) return false;
|
||||||
}
|
}
|
||||||
|
@ -255,8 +255,11 @@ public class Econ
|
|||||||
|
|
||||||
for (Faction faction : Factions.i.get())
|
for (Faction faction : Factions.i.get())
|
||||||
{
|
{
|
||||||
faction.getAccount().add(faction.money);
|
if (faction.money > 0)
|
||||||
faction.money = 0;
|
{
|
||||||
|
faction.getAccount().add(faction.money);
|
||||||
|
faction.money = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,11 +194,12 @@ public class SpoutFeatures
|
|||||||
if (viewedFaction == null)
|
if (viewedFaction == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
SpoutPlayer sPlayer = SpoutManager.getPlayer(viewer.getPlayer());
|
|
||||||
Player pViewed = viewed.getPlayer();
|
Player pViewed = viewed.getPlayer();
|
||||||
if (pViewed == null || viewer.getPlayer() == null)
|
Player pViewer = viewer.getPlayer();
|
||||||
|
if (pViewed == null || pViewer == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SpoutPlayer sPlayer = SpoutManager.getPlayer(pViewer);
|
||||||
String viewedTitle = viewed.getTitle();
|
String viewedTitle = viewed.getTitle();
|
||||||
Rel viewedRole = viewed.getRole();
|
Rel viewedRole = viewed.getRole();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user