mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 03:38:28 +00:00
[trunk] temp double fix, we should probably change doubles to decimals in prices
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1420 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
parent
106a44d3a0
commit
e0a7996885
1 changed files with 3 additions and 2 deletions
|
@ -44,7 +44,7 @@ public class EssentialsEcoPlayerListener extends PlayerListener
|
|||
{
|
||||
int amount = Integer.parseInt(sign.getLine(1));
|
||||
ItemStack item = ItemDb.get(sign.getLine(2), amount);
|
||||
double cost = Double.parseDouble(sign.getLine(3).substring(1));
|
||||
double cost = Double.parseDouble(sign.getLine(3).substring(1).replaceAll(",", "."));
|
||||
if (user.getMoney() < cost)
|
||||
{
|
||||
throw new Exception(Util.i18n("notEnoughMoney"));
|
||||
|
@ -70,7 +70,8 @@ public class EssentialsEcoPlayerListener extends PlayerListener
|
|||
{
|
||||
int amount = Integer.parseInt(sign.getLine(1));
|
||||
ItemStack item = ItemDb.get(sign.getLine(2), amount);
|
||||
double cost = Double.parseDouble(sign.getLine(3).substring(1));
|
||||
double cost = Double.parseDouble(sign.getLine(3).substring(1).replaceAll(",", "."));
|
||||
|
||||
if (!InventoryWorkaround.containsItem(user.getInventory(), true, item))
|
||||
{
|
||||
throw new Exception(Util.format("missingItems", amount, sign.getLine(2)));
|
||||
|
|
Loading…
Reference in a new issue