diff --git a/src/main/java/xyz/etztech/minecraftmanager/listeners/SessionListener.java b/src/main/java/xyz/etztech/minecraftmanager/listeners/SessionListener.java index f840450..d61d44d 100644 --- a/src/main/java/xyz/etztech/minecraftmanager/listeners/SessionListener.java +++ b/src/main/java/xyz/etztech/minecraftmanager/listeners/SessionListener.java @@ -61,9 +61,8 @@ public class SessionListener implements Listener { JsonArray query = response.getResults(); if (query.size() == 1) { JsonElement element = query.get(0).getAsJsonObject().get("accepted"); - boolean accepted = !element.isJsonNull() && element.getAsBoolean(); - if (accepted) { - MinecraftManagerThread.action(name, true); + if (!element.isJsonNull()) { + MinecraftManagerThread.action(name, element.getAsBoolean()); } } }