Economy integration is now handled through Vault instead of Register. You will need to download and install the Vault plugin now if you want to use any Economy-related features. If you're not using the Register plugin for anything other than Factions, it should be safe to remove it from your server.
Vault: http://dev.bukkit.org/server-mods/vault/ Note: for proper faction bank support, if you're using iCo5 or EssentialsEco, I recommend waiting for Vault 1.2.5 to be released which addresses faction account creation issues related to those.
This commit is contained in:
@ -64,9 +64,8 @@ public class CmdDisband extends FCommand
|
||||
if (Econ.shouldBeUsed())
|
||||
{
|
||||
//Give all the faction's money to the disbander
|
||||
double amount = faction.getAccount().balance();
|
||||
fme.getAccount().add(amount);
|
||||
faction.getAccount().remove();
|
||||
double amount = Econ.getBalance(faction.getAccountId());
|
||||
Econ.transferMoney(fme, faction, fme, amount, false);
|
||||
|
||||
if (amount > 0.0)
|
||||
{
|
||||
|
@ -36,10 +36,10 @@ public class CmdMoneyDeposit extends FCommand
|
||||
double amount = this.argAsDouble(0, 0d);
|
||||
EconomyParticipator faction = this.argAsFaction(1, myFaction);
|
||||
if (faction == null) return;
|
||||
Econ.transferMoney(fme, fme, faction, amount);
|
||||
boolean success = Econ.transferMoney(fme, fme, faction, amount);
|
||||
|
||||
if (Conf.logMoneyTransactions)
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse("%s deposited %s from the faction bank: %s", fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
if (success && Conf.logMoneyTransactions)
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse("%s deposited %s in the faction bank: %s", fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ public class CmdMoneyTransferFf extends FCommand
|
||||
EconomyParticipator to = this.argAsFaction(2);
|
||||
if (to == null) return;
|
||||
|
||||
Econ.transferMoney(fme, from, to, amount);
|
||||
boolean success = Econ.transferMoney(fme, from, to, amount);
|
||||
|
||||
if (Conf.logMoneyTransactions)
|
||||
if (success && Conf.logMoneyTransactions)
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse("%s transferred %s from the faction \"%s\" to the faction \"%s\"", fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ public class CmdMoneyTransferFp extends FCommand
|
||||
EconomyParticipator to = this.argAsBestFPlayerMatch(2);
|
||||
if (to == null) return;
|
||||
|
||||
Econ.transferMoney(fme, from, to, amount);
|
||||
boolean success = Econ.transferMoney(fme, from, to, amount);
|
||||
|
||||
if (Conf.logMoneyTransactions)
|
||||
if (success && Conf.logMoneyTransactions)
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse("%s transferred %s from the faction \"%s\" to the player \"%s\"", fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
@ -39,9 +39,9 @@ public class CmdMoneyTransferPf extends FCommand
|
||||
EconomyParticipator to = this.argAsFaction(2);
|
||||
if (to == null) return;
|
||||
|
||||
Econ.transferMoney(fme, from, to, amount);
|
||||
boolean success = Econ.transferMoney(fme, from, to, amount);
|
||||
|
||||
if (Conf.logMoneyTransactions)
|
||||
if (success && Conf.logMoneyTransactions)
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse("%s transferred %s from the player \"%s\" to the faction \"%s\"", fme.getName(), Econ.moneyString(amount), from.describeTo(null), to.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
@ -34,9 +34,9 @@ public class CmdMoneyWithdraw extends FCommand
|
||||
double amount = this.argAsDouble(0, 0d);
|
||||
EconomyParticipator faction = this.argAsFaction(1, myFaction);
|
||||
if (faction == null) return;
|
||||
Econ.transferMoney(fme, faction, fme, amount);
|
||||
boolean success = Econ.transferMoney(fme, faction, fme, amount);
|
||||
|
||||
if (Conf.logMoneyTransactions)
|
||||
if (success && Conf.logMoneyTransactions)
|
||||
P.p.log(ChatColor.stripColor(P.p.txt.parse("%s withdrew %s from the faction bank: %s", fme.getName(), Econ.moneyString(amount), faction.describeTo(null))));
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ public class CmdShow extends FCommand
|
||||
//Show bank contents
|
||||
if(Conf.bankEnabled)
|
||||
{
|
||||
msg("<a>Bank contains: <i>"+Econ.moneyString(faction.getAccount().balance()));
|
||||
msg("<a>Bank contains: <i>"+Econ.moneyString(Econ.getBalance(faction.getAccountId())));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user