mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-02 13:31:54 +01:00
[trunk] more trade sign fixes, upon breaking
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1361 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
1c68dde4a8
commit
050b2cae18
@ -53,11 +53,11 @@ public class EssentialsEcoBlockListener extends BlockListener
|
||||
String[] l2 = sign.getLines()[2].split("[ :-]+");
|
||||
boolean m1 = l1[0].matches("\\$[0-9]+(\\.[0-9]+)?");
|
||||
boolean m2 = l2[0].matches("\\$[0-9]+(\\.[0-9]+)?");
|
||||
int q1 = Integer.parseInt(m1 ? l1[0].substring(1) : l1[0]);
|
||||
int q2 = Integer.parseInt(m2 ? l2[0].substring(1) : l2[0]);
|
||||
double q1 = Double.parseDouble(m1 ? l1[0].substring(1) : l1[0]);
|
||||
double q2 = Double.parseDouble(m2 ? l2[0].substring(1) : l2[0]);
|
||||
double r1 = Double.parseDouble(l1[m1 ? 1 : 2]);
|
||||
double r2 = Double.parseDouble(l2[m2 ? 1 : 2]);
|
||||
if (q1 < 1 || q2 < 1)
|
||||
if ((!m1 & q1 < 1) || (!m2 & q2 < 1))
|
||||
{
|
||||
throw new Exception("Quantities must be greater than 0.");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user