mirror of
https://github.com/craftycodie/OnlineModeFix.git
synced 2025-08-03 17:05:58 -04:00
1.1.3
This commit is contained in:
parent
c43ad4a216
commit
dfb83f8eda
@ -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
|
||||
|
@ -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,19 +50,14 @@ 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) {
|
||||
response = "YES";
|
||||
}
|
||||
}
|
||||
|
||||
boolean validJoin = SessionServer.hasJoined(username, serverId, ip);
|
||||
|
||||
if (validJoin) {
|
||||
response = "YES";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputStream getInputStream() throws IOException {
|
||||
return new ByteArrayInputStream(response.getBytes());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user