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:
Brettflan
2012-01-16 19:38:14 -06:00
parent de14985d1e
commit 2a9b475012
15 changed files with 115 additions and 93 deletions

View File

@@ -19,7 +19,6 @@ import com.massivecraft.factions.struct.FPerm;
import com.massivecraft.factions.struct.Rel;
import com.massivecraft.factions.util.RelationUtil;
import com.massivecraft.factions.zcore.persist.PlayerEntity;
import com.nijikokun.register.payment.Method.MethodAccount;
/**
@@ -109,11 +108,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
public boolean isSpyingChat() { return spyingChat; }
// FIELD: account
public MethodAccount getAccount()
{
if ( ! Econ.shouldBeUsed()) return null;
return Econ.getMethod().getAccount(this.getId());
}
public String getAccountId() { return this.getId(); }
// -------------------------------------------- //
// Construct
@@ -507,7 +502,7 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
{
// Transfer all money
if (Econ.shouldBeUsed())
Econ.transferMoney(this, myFaction, this, myFaction.getAccount().balance());
Econ.transferMoney(this, myFaction, this, Econ.getBalance(myFaction.getAccountId()));
}
if (myFaction.isNormal())