From 5dc332691b87c255e03f6450a8c2a03dbf2bf02c Mon Sep 17 00:00:00 2001 From: Brettflan Date: Sun, 18 Dec 2011 01:36:36 -0600 Subject: [PATCH] Hopefully fix a couple of economy integration problems --- src/com/massivecraft/factions/Faction.java | 2 +- src/com/massivecraft/factions/integration/Econ.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/factions/Faction.java b/src/com/massivecraft/factions/Faction.java index 3b9c1bd5..1024e78d 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -126,7 +126,7 @@ public class Faction extends Entity implements EconomyParticipator if ( ! Econ.getMethod().createAccount(aid)) { P.p.log(Level.SEVERE, "Error creating faction bank account through Register: "+aid); - return null; +// return null; } MethodAccount acc = Econ.getMethod().getAccount(aid); acc.set(0); diff --git a/src/com/massivecraft/factions/integration/Econ.java b/src/com/massivecraft/factions/integration/Econ.java index c5cbf81b..f5e11133 100644 --- a/src/com/massivecraft/factions/integration/Econ.java +++ b/src/com/massivecraft/factions/integration/Econ.java @@ -265,8 +265,11 @@ public class Econ for (Faction faction : Factions.i.get()) { - faction.getAccount().add(faction.money); - faction.money = 0; + if (faction.money > 0) + { + faction.getAccount().add(faction.money); + faction.money = 0; + } } }