Browse Source

Shop.java add subtractGold()

remotes/origin/shop
Max Gerbeth 2 years ago
parent
commit
172c8e6997
  1. 7
      src/main/java/org/bitbiome/shop/Shop.java

7
src/main/java/org/bitbiome/shop/Shop.java

@ -66,8 +66,7 @@ public class Shop {
} }
//Player gold subtract //Player gold subtract
gold -= costs;
playerConfig.put("gold", gold);
playerConfig.put("gold", subtractGold(gold, costs));
//Gameconfig amount reduese //Gameconfig amount reduese
JSONArray jsonArray2 = gameConfig.getJSONArray("shopitems"); JSONArray jsonArray2 = gameConfig.getJSONArray("shopitems");
@ -233,4 +232,8 @@ public class Shop {
} }
System.out.println(""); System.out.println("");
} }
private int subtractGold(int gold, int cost){
return gold - cost;
}
} }
Loading…
Cancel
Save