whopsiies

This commit is contained in:
Chayapak 2023-07-12 21:04:47 +07:00
parent 5ed45a658f
commit c7ee378b46

View file

@ -48,9 +48,11 @@ public class SeenCommand extends Command {
final JsonObject lastSeen = playerElement.getAsJsonObject().get("lastSeen").getAsJsonObject();
if (lastSeen == null) return null;
final JsonElement time = lastSeen.get("time");
final DateTime dateTime = new DateTime(lastSeen.get("time").getAsLong(), DateTimeZone.UTC);
if (time == null) return null;
final DateTime dateTime = new DateTime(time.getAsLong(), DateTimeZone.UTC);
final DateTimeFormatter formatter = DateTimeFormat.forPattern("EEEE, MMMM d, YYYY, hh:mm:ss a z");
final String formattedTime = formatter.print(dateTime);