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
version: 1.1.2
version: 1.1.3
description: Fixes online-mode authentication.
author: craftycodie
authors: [Codie]
website: https://twitter.com/craftycodie
website: https://linktr.ee/craftycodie
main: gg.codie.mineonline.plugin.bukkit.OnlineModeFixPlugin
database: false

View File

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