diff --git a/src/main/java/org/bitbiome/commands/GoldCommand.java b/src/main/java/org/bitbiome/commands/GoldCommand.java index 4330cf5..633ea1b 100644 --- a/src/main/java/org/bitbiome/commands/GoldCommand.java +++ b/src/main/java/org/bitbiome/commands/GoldCommand.java @@ -12,7 +12,7 @@ public class GoldCommand implements CommandAPI{ public static String getGoldMessage(Player player) { - return "Dein Gold: " + player.getGold(); + return "Du hast " + player.getGold() + " Gold"; } @Override diff --git a/src/main/java/org/bitbiome/entities/Player.java b/src/main/java/org/bitbiome/entities/Player.java index 3cb83c5..8223d8c 100644 --- a/src/main/java/org/bitbiome/entities/Player.java +++ b/src/main/java/org/bitbiome/entities/Player.java @@ -24,7 +24,7 @@ public class Player { hp = 100.0F; location = new Location(jp.getJSONObject("playerconfig.json").getString("currentLocation"), new ArrayList<>(), new ArrayList<>()); inventory = new ArrayList<>(); - gold = jp.getJSONObject("playerconfig.json").getFloat("gold"); + gold = jp.getJSONObject("playerconfig.json").getInt("gold"); } public String getName() { @@ -63,8 +63,8 @@ public class Player { this.name = name; } - public float getGold() { return gold; } + public int getGold() { return (int) gold; } - public void setGold(float gold) { this.gold = gold; } + public int setGold(int gold) { this.gold = gold; return gold; } }