mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01:00
[trunk] /sell: fix negative value
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1226 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
8ede5aad01
commit
2571d31cb0
@ -32,6 +32,9 @@ public class Commandsell extends EssentialsCommand
|
|||||||
int amount = 0;
|
int amount = 0;
|
||||||
if (args.length > 1) {
|
if (args.length > 1) {
|
||||||
amount = Integer.parseInt(args[1].replaceAll("[^0-9]", ""));
|
amount = Integer.parseInt(args[1].replaceAll("[^0-9]", ""));
|
||||||
|
if (args[1].startsWith("-")) {
|
||||||
|
amount = -amount;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
double worth = Essentials.getWorth().getPrice(is);
|
double worth = Essentials.getWorth().getPrice(is);
|
||||||
boolean stack = args.length > 1 && args[1].endsWith("s");
|
boolean stack = args.length > 1 && args[1].endsWith("s");
|
||||||
|
Loading…
Reference in New Issue
Block a user