From 0687caf05173f955fd51eb15de60e384c4c31dea Mon Sep 17 00:00:00 2001 From: Joey Hines Date: Mon, 3 Aug 2020 20:06:41 -0500 Subject: [PATCH] Fixed formatting in getFormattedLocatedString and selling + selling now includes the portal of a shop + tunnels are listed before coordinates --- .../com/zerohighdef/geoffrey/Models/GeoffreyLocation.java | 6 ++++-- .../zerohighdef/geoffrey/Objects/GeoffreyAPICallback.java | 6 ++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zerohighdef/geoffrey/Models/GeoffreyLocation.java b/src/main/java/com/zerohighdef/geoffrey/Models/GeoffreyLocation.java index 3709c3c..2c20b77 100644 --- a/src/main/java/com/zerohighdef/geoffrey/Models/GeoffreyLocation.java +++ b/src/main/java/com/zerohighdef/geoffrey/Models/GeoffreyLocation.java @@ -41,12 +41,14 @@ public class GeoffreyLocation { } public String getFormattedLocationString() { - String locationString = locationName + " @ " + getPositionString() + " Owner: " + owner.getUsername(); + String locationString = locationName + " @ "; if (tunnelString != null) { - locationString += " Tunnel: " + tunnelString; + locationString += tunnelString + " "; } + locationString += getPositionString() + " Owner: " + owner.getUsername(); + return locationString; } diff --git a/src/main/java/com/zerohighdef/geoffrey/Objects/GeoffreyAPICallback.java b/src/main/java/com/zerohighdef/geoffrey/Objects/GeoffreyAPICallback.java index 3e23f16..d02944e 100644 --- a/src/main/java/com/zerohighdef/geoffrey/Objects/GeoffreyAPICallback.java +++ b/src/main/java/com/zerohighdef/geoffrey/Objects/GeoffreyAPICallback.java @@ -76,10 +76,8 @@ public abstract class GeoffreyAPICallback implements ICallback { JsonObject jsonObject = element.getAsJsonObject(); GeoffreyShop geoffreyShop = new GeoffreyShop(jsonObject); - stringBuilder.append(geoffreyShop.getLocationName()); - stringBuilder.append(" "); - stringBuilder.append(geoffreyShop.getPositionString()); - stringBuilder.append(" "); + stringBuilder.append(geoffreyShop.getFormattedLocationString()); + stringBuilder.append("\n"); stringBuilder.append(geoffreyShop.getFirstItem().getFormattedItemListing()); stringBuilder.append("\n"); }