mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-16 03:24:31 +02:00
[trunk] formatting
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1306 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
@@ -12,8 +12,9 @@ import org.bukkit.inventory.ItemStack;
|
||||
|
||||
public class EssentialsEcoBlockListener extends BlockListener
|
||||
{
|
||||
public static DecimalFormat df = new DecimalFormat ("0.##");
|
||||
public static DecimalFormat df = new DecimalFormat("0.##");
|
||||
Essentials ess;
|
||||
|
||||
public EssentialsEcoBlockListener(Essentials ess)
|
||||
{
|
||||
this.ess = ess;
|
||||
@@ -63,8 +64,8 @@ public class EssentialsEcoBlockListener extends BlockListener
|
||||
throw new Exception("Quantities must be greater than 0.");
|
||||
}
|
||||
|
||||
ItemStack i1 = m1 || r1 <= 0 ? null : ItemDb.get(l1[1], (int) r1);
|
||||
ItemStack i2 = m2 || r2 <= 0 ? null : ItemDb.get(l2[1], (int) r2);
|
||||
ItemStack i1 = m1 || r1 <= 0 ? null : ItemDb.get(l1[1], (int)r1);
|
||||
ItemStack i2 = m2 || r2 <= 0 ? null : ItemDb.get(l2[1], (int)r2);
|
||||
|
||||
if (m1)
|
||||
{
|
||||
@@ -115,9 +116,9 @@ 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);
|
||||
String d = df.format(Double.parseDouble(event.getLine(3).replaceAll("[^0-9\\.]", "")));
|
||||
Double dbl = new Double(d);
|
||||
event.setLine(3, "$" + (double)dbl);
|
||||
}
|
||||
catch (Throwable ex)
|
||||
{
|
||||
@@ -141,9 +142,9 @@ 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);
|
||||
String d = df.format(Double.parseDouble(event.getLine(3).replaceAll("[^0-9\\.]", "")));
|
||||
Double dbl = new Double(d);
|
||||
event.setLine(3, "$" + (double)dbl);
|
||||
}
|
||||
catch (Throwable ex)
|
||||
{
|
||||
@@ -188,7 +189,7 @@ public class EssentialsEcoBlockListener extends BlockListener
|
||||
}
|
||||
else
|
||||
{
|
||||
ItemStack i2 = ItemDb.get(l2[1], (int) r2);
|
||||
ItemStack i2 = ItemDb.get(l2[1], (int)r2);
|
||||
if (!InventoryWorkaround.containsItem(user.getInventory(), true, i2))
|
||||
{
|
||||
throw new Exception("You do not have " + r2 + "x " + l2[1] + ".");
|
||||
|
Reference in New Issue
Block a user