This commit is contained in:
Codie Newark 2021-07-12 19:26:38 +01:00
parent c43ad4a216
commit dfb83f8eda
2 changed files with 13 additions and 13 deletions

View File

@ -1,9 +1,9 @@
name: OnlineModeFix name: OnlineModeFix
version: 1.1.2 version: 1.1.3
description: Fixes online-mode authentication. description: Fixes online-mode authentication.
author: craftycodie author: craftycodie
authors: [Codie] authors: [Codie]
website: https://twitter.com/craftycodie website: https://linktr.ee/craftycodie
main: gg.codie.mineonline.plugin.bukkit.OnlineModeFixPlugin main: gg.codie.mineonline.plugin.bukkit.OnlineModeFixPlugin
database: false database: false

View File

@ -27,6 +27,11 @@ public class CheckServerURLConnection extends HttpURLConnection {
@Override @Override
public void connect() throws IOException { public void connect() throws IOException {
}
@Override
public InputStream getInputStream() throws IOException {
String username = null; String username = null;
String serverId = null; String serverId = null;
String ip = null; String ip = null;
@ -45,10 +50,7 @@ public class CheckServerURLConnection extends HttpURLConnection {
ip = keyValue[1]; ip = keyValue[1];
} }
if (username == null || serverId == null) { if (username != null && serverId != null) {
return;
}
boolean validJoin = SessionServer.hasJoined(username, serverId, ip); boolean validJoin = SessionServer.hasJoined(username, serverId, ip);
if (validJoin) { if (validJoin) {
@ -56,8 +58,6 @@ public class CheckServerURLConnection extends HttpURLConnection {
} }
} }
@Override
public InputStream getInputStream() throws IOException {
return new ByteArrayInputStream(response.getBytes()); return new ByteArrayInputStream(response.getBytes());
} }