summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-02 00:46:15 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-02 00:46:15 +0000
commitb986a3d50301d039c311fc58a9390111667e6ca6 (patch)
treee5d1940db43fc94dded53a3d2b33ba2f24333ed1
parent7426b641a48047400e8807c5224f221a2b53afeb (diff)
downloadEssentials-b986a3d50301d039c311fc58a9390111667e6ca6.tar
Essentials-b986a3d50301d039c311fc58a9390111667e6ca6.tar.gz
Essentials-b986a3d50301d039c311fc58a9390111667e6ca6.tar.lz
Essentials-b986a3d50301d039c311fc58a9390111667e6ca6.tar.xz
Essentials-b986a3d50301d039c311fc58a9390111667e6ca6.zip
[trunk] Eco: removed useless converting string => double => string
Missing brackets added git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1307 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsEcoBlockListener.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsEcoBlockListener.java b/Essentials/src/com/earth2me/essentials/EssentialsEcoBlockListener.java
index 5b5e0f7df..0d45082b4 100644
--- a/Essentials/src/com/earth2me/essentials/EssentialsEcoBlockListener.java
+++ b/Essentials/src/com/earth2me/essentials/EssentialsEcoBlockListener.java
@@ -105,7 +105,7 @@ public class EssentialsEcoBlockListener extends BlockListener
User user = ess.getUser(event.getPlayer());
String username = user.getName().substring(0, user.getName().length() > 14 ? 14 : user.getName().length());
- if (event.getLine(0).equalsIgnoreCase("[Buy]") || event.getLine(0).equalsIgnoreCase("#1[Buy]") && user.isAuthorized("essentials.signs.buy.create"))
+ if ((event.getLine(0).equalsIgnoreCase("[Buy]") || event.getLine(0).equalsIgnoreCase("#1[Buy]")) && user.isAuthorized("essentials.signs.buy.create"))
{
try
{
@@ -117,8 +117,7 @@ public class EssentialsEcoBlockListener extends BlockListener
throw new Exception("Don't sell air.");
}
String d = df.format(Double.parseDouble(event.getLine(3).replaceAll("[^0-9\\.]", "")));
- Double dbl = new Double(d);
- event.setLine(3, "$" + (double)dbl);
+ event.setLine(3, "$" + d);
}
catch (Throwable ex)
{
@@ -131,7 +130,7 @@ public class EssentialsEcoBlockListener extends BlockListener
return;
}
- if (event.getLine(0).equalsIgnoreCase("[Sell]") || event.getLine(0).equalsIgnoreCase("#1[Sell]") && user.isAuthorized("essentials.signs.sell.create"))
+ if ((event.getLine(0).equalsIgnoreCase("[Sell]") || event.getLine(0).equalsIgnoreCase("#1[Sell]")) && user.isAuthorized("essentials.signs.sell.create"))
{
try
{
@@ -143,8 +142,7 @@ public class EssentialsEcoBlockListener extends BlockListener
throw new Exception("Don't buy air.");
}
String d = df.format(Double.parseDouble(event.getLine(3).replaceAll("[^0-9\\.]", "")));
- Double dbl = new Double(d);
- event.setLine(3, "$" + (double)dbl);
+ event.setLine(3, "$" + d);
}
catch (Throwable ex)
{
@@ -157,7 +155,7 @@ public class EssentialsEcoBlockListener extends BlockListener
return;
}
- if (event.getLine(0).equalsIgnoreCase("[Trade]") || event.getLine(0).equalsIgnoreCase("#1[Trade]") && user.isAuthorized("essentials.signs.trade.create"))
+ if ((event.getLine(0).equalsIgnoreCase("[Trade]") || event.getLine(0).equalsIgnoreCase("#1[Trade]")) && user.isAuthorized("essentials.signs.trade.create"))
{
try
{