diff options
author | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-16 15:33:52 +0000 |
---|---|---|
committer | snowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-04-16 15:33:52 +0000 |
commit | 76b4a5e8aceff1c0dc9f7fdc6e8ba4b2fdc2684c (patch) | |
tree | 9d0eb22588c96d63cbb862ea13985377a0a22835 | |
parent | df37b86a57e546351d549a9ab615fc621bca6fc8 (diff) | |
download | Essentials-76b4a5e8aceff1c0dc9f7fdc6e8ba4b2fdc2684c.tar Essentials-76b4a5e8aceff1c0dc9f7fdc6e8ba4b2fdc2684c.tar.gz Essentials-76b4a5e8aceff1c0dc9f7fdc6e8ba4b2fdc2684c.tar.lz Essentials-76b4a5e8aceff1c0dc9f7fdc6e8ba4b2fdc2684c.tar.xz Essentials-76b4a5e8aceff1c0dc9f7fdc6e8ba4b2fdc2684c.zip |
[trunk] /sell: fix negative value
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1226 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandsell.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java index 7d66284b1..a80b28387 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsell.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsell.java @@ -32,6 +32,9 @@ public class Commandsell extends EssentialsCommand int amount = 0; if (args.length > 1) { amount = Integer.parseInt(args[1].replaceAll("[^0-9]", "")); + if (args[1].startsWith("-")) { + amount = -amount; + } } double worth = Essentials.getWorth().getPrice(is); boolean stack = args.length > 1 && args[1].endsWith("s"); |