package com.mojang.realmsclient.dto; import com.google.gson.JsonObject; import com.mojang.realmsclient.util.JsonUtils; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; import org.jetbrains.annotations.Nullable; @Environment(EnvType.CLIENT) public class ServerActivity extends ValueObject { @Nullable public String profileUuid; public long joinTime; public long leaveTime; public static ServerActivity parse(JsonObject json) { ServerActivity serverActivity = new ServerActivity(); try { serverActivity.profileUuid = JsonUtils.getStringOr("profileUuid", json, null); serverActivity.joinTime = JsonUtils.getLongOr("joinTime", json, Long.MIN_VALUE); serverActivity.leaveTime = JsonUtils.getLongOr("leaveTime", json, Long.MIN_VALUE); } catch (Exception var3) { } return serverActivity; } }