From 85b25fae391c50865a0d01e0c67c8ceef077cfde Mon Sep 17 00:00:00 2001 From: Juliakn66 <117075450+Juliakn66@users.noreply.github.com> Date: Fri, 27 Jan 2023 14:27:04 +0100 Subject: [PATCH] refactoring: added colors --- src/main/java/org/bitbiome/commands/InventoryCommand.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bitbiome/commands/InventoryCommand.java b/src/main/java/org/bitbiome/commands/InventoryCommand.java index 94af13d..0892636 100644 --- a/src/main/java/org/bitbiome/commands/InventoryCommand.java +++ b/src/main/java/org/bitbiome/commands/InventoryCommand.java @@ -1,5 +1,6 @@ package org.bitbiome.commands; +import org.bitbiome.classes.Colors; import org.bitbiome.classes.JsonParser; import org.bitbiome.classes.TravelEngine; import org.bitbiome.entities.Item; @@ -21,9 +22,9 @@ public class InventoryCommand implements CommandAPI { JSONObject o = jp.getJSONObject("playerconfig.json"); ArrayList inventory = travelEngine.getPlayer().getInventory(); - s.append("Inventory: \n"); + s.append(Colors.ANSI_BRIGHT_RED +"Inventory:\n"+ Colors.ANSI_RESET); for (int i=0; i < inventory.size(); i++){ - s.append("- ").append(inventory.get(i).getName()).append(" x").append(inventory.get(i).getAmount()).append("\n"); + s.append(Colors.ANSI_BRIGHT_BG_RED+ Colors.ANSI_BRIGHT_WHITE+ "- ").append(inventory.get(i).getName()).append(" x").append(inventory.get(i).getAmount()).append(" "+ Colors.ANSI_RESET + "\n" ); } return s.toString();