From 101aa8cabe00b226ef4b64721e455117b9b3859d Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 23 Nov 2011 00:11:30 -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 bb390164..3a016a70 100644 --- a/src/com/massivecraft/factions/Faction.java +++ b/src/com/massivecraft/factions/Faction.java @@ -92,7 +92,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 6826d3b8..b04557ef 100644 --- a/src/com/massivecraft/factions/integration/Econ.java +++ b/src/com/massivecraft/factions/integration/Econ.java @@ -255,8 +255,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; + } } }