From 332a59f3fc65f0c05490e2d690707fd76d254ad7 Mon Sep 17 00:00:00 2001 From: Iaccidentally Date: Sun, 4 Nov 2012 16:25:09 -0500 Subject: allow money to be put in kits using the currency symbol before the amount --- Essentials/src/com/earth2me/essentials/Kit.java | 7 +++++++ 1 file changed, 7 insertions(+) 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(); -- cgit v1.2.3