summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIaccidentally <coryhuckaby@gmail.com>2012-11-04 16:25:09 -0500
committerIaccidentally <coryhuckaby@gmail.com>2012-11-04 16:25:09 -0500
commit332a59f3fc65f0c05490e2d690707fd76d254ad7 (patch)
tree7db33c3d769126654573c5593a63aa12dfbd4c7a
parent587f5329915328a023e46e880f573a009e72d8a2 (diff)
downloadEssentials-332a59f3fc65f0c05490e2d690707fd76d254ad7.tar
Essentials-332a59f3fc65f0c05490e2d690707fd76d254ad7.tar.gz
Essentials-332a59f3fc65f0c05490e2d690707fd76d254ad7.tar.lz
Essentials-332a59f3fc65f0c05490e2d690707fd76d254ad7.tar.xz
Essentials-332a59f3fc65f0c05490e2d690707fd76d254ad7.zip
allow money to be put in kits using the currency symbol before the amount
-rw-r--r--Essentials/src/com/earth2me/essentials/Kit.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Kit.java b/Essentials/src/com/earth2me/essentials/Kit.java
index d0a3b5d7e..476aaea97 100644
--- a/Essentials/src/com/earth2me/essentials/Kit.java
+++ b/Essentials/src/com/earth2me/essentials/Kit.java
@@ -102,6 +102,13 @@ public class Kit
boolean spew = false;
for (String d : items)
{
+ if (d.startsWith(ess.getSettings().getCurrencySymbol()))
+ {
+ Double value = Double.parseDouble(d.substring(ess.getSettings().getCurrencySymbol().length()).trim());
+ Trade t = new Trade(value, ess);
+ t.pay(user);
+ continue;
+ }
final String[] parts = d.split(" ");
final String[] item = parts[0].split("[:+',;.]", 2);
final int id = Material.getMaterial(Integer.parseInt(item[0])).getId();