From 7a38ee42a79c7a2eb23063d6b1a55e60e30f50f6 Mon Sep 17 00:00:00 2001 From: Brettflan Date: Tue, 31 Jan 2012 11:07:48 -0600 Subject: [PATCH] zero-value economy gains/losses are now skipped over ("X gained 0.0 for claiming this land" and similar is a bit odd) CLeaned up warning given for UnknownFormatConversionException chat exception; the debug info is no longer useful for us, and a distraction for users. --- src/com/massivecraft/factions/integration/Econ.java | 9 ++++++++- .../factions/listeners/FactionsPlayerListener.java | 7 ++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/com/massivecraft/factions/integration/Econ.java b/src/com/massivecraft/factions/integration/Econ.java index d8cb8300..cb501e2f 100644 --- a/src/com/massivecraft/factions/integration/Econ.java +++ b/src/com/massivecraft/factions/integration/Econ.java @@ -220,7 +220,14 @@ public class Econ String acc = ep.getAccountId(); String You = ep.describeTo(ep, true); - if (delta >= 0) + if (delta == 0) + { + // no money actually transferred? +// ep.msg("%s didn't have to pay anything %s.", You, forDoingThis); // might be for gains, might be for losses + return true; + } + + if (delta > 0) { // The player should gain money // There is no risk of failure diff --git a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java index 6b03582a..4519a0d8 100644 --- a/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java +++ b/src/com/massivecraft/factions/listeners/FactionsPlayerListener.java @@ -124,12 +124,9 @@ public class FactionsPlayerListener implements Listener } catch (UnknownFormatConversionException ex) { - P.p.log(Level.SEVERE, "Critical error in chat message formatting! Complete format string: "+yourFormat); - P.p.log(Level.SEVERE, "First half of event.getFormat() string: "+formatStart); - P.p.log(Level.SEVERE, "Second half of event.getFormat() string: "+formatEnd); + P.p.log(Level.SEVERE, "Critical error in chat message formatting!"); P.p.log(Level.SEVERE, "NOTE: To fix this quickly, running this command should work: f config chatTagInsertIndex 0"); - P.p.log(Level.SEVERE, "For a more proper fix, please read the chat configuration notes on the configuration page of the Factions user guide."); - ex.printStackTrace(); + P.p.log(Level.SEVERE, "For a more proper fix, please read this regarding chat configuration: http://massivecraft.com/plugins/factions/config#Chat_configuration"); return; } }