diff options
author | snowleo <schneeleo@gmail.com> | 2011-06-30 23:27:00 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-06-30 23:27:00 +0200 |
commit | 9121209799a1eb0d0bc0b061340d001a8b827315 (patch) | |
tree | eb7411d002d0ce0b01ae4ac3f1270e11aa83fc25 | |
parent | 7818753d960e0cb545a492c07fee4499bf2a81c0 (diff) | |
download | Essentials-9121209799a1eb0d0bc0b061340d001a8b827315.tar Essentials-9121209799a1eb0d0bc0b061340d001a8b827315.tar.gz Essentials-9121209799a1eb0d0bc0b061340d001a8b827315.tar.lz Essentials-9121209799a1eb0d0bc0b061340d001a8b827315.tar.xz Essentials-9121209799a1eb0d0bc0b061340d001a8b827315.zip |
Fix for a bug in getTrade() of Signs that would return the quantity of items as money.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java index ecd2aedb4..c1be18e7e 100644 --- a/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java +++ b/Essentials/src/com/earth2me/essentials/signs/EssentialsSign.java @@ -327,7 +327,7 @@ public class EssentialsSign protected final Double getMoney(final String line) throws SignException { - final boolean isMoney = line.matches("^[^0-9-\\.][\\.0-9]+"); + final boolean isMoney = line.matches("^[^0-9-\\.][\\.0-9]+$"); return isMoney ? getDouble(line.substring(1)) : null; } @@ -381,15 +381,12 @@ public class EssentialsSign { final ItemStack stack = getItemStack(item, quantity); sign.setLine(index, quantity + " " + item); - return new Trade(quantity, ess); + return new Trade(stack, ess); } } else { return new Trade(money, ess); - - - } } |