mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-05 20:13:08 +00:00
Correct usage of Json.
I'm dumb and forgot toString doesn't work. Repalce with getAsString
This commit is contained in:
parent
591eb60a71
commit
92a18d810c
2 changed files with 2 additions and 2 deletions
|
@ -670,7 +670,7 @@ public class PlayerEvents extends PlotListener implements Listener {
|
||||||
JsonObject result = (new JsonParser())
|
JsonObject result = (new JsonParser())
|
||||||
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
|
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
|
||||||
.getAsJsonObject();
|
.getAsJsonObject();
|
||||||
spigotVersion = result.get("current_version").toString();
|
spigotVersion = result.get("current_version").getAsString();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
new PlotMessage(Captions.PREFIX
|
new PlotMessage(Captions.PREFIX
|
||||||
+ "Unable to check for updates, check console for further information.")
|
+ "Unable to check for updates, check console for further information.")
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class UpdateUtility implements Listener {
|
||||||
JsonObject result = (new JsonParser())
|
JsonObject result = (new JsonParser())
|
||||||
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
|
.parse(new JsonReader(new InputStreamReader(connection.getInputStream())))
|
||||||
.getAsJsonObject();
|
.getAsJsonObject();
|
||||||
spigotVersion = result.get("current_version").toString();
|
spigotVersion = result.get("current_version").getAsString();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
PlotSquared.log(Captions.PREFIX + "&cUnable to check for updates because: " + e);
|
PlotSquared.log(Captions.PREFIX + "&cUnable to check for updates because: " + e);
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue