forked from sorceress/EasyAuth
Fixing handleDisconnection() #9
This commit is contained in:
parent
f6b1ea8147
commit
4db0578cf7
|
@ -3,11 +3,11 @@ org.gradle.jvmargs=-Xmx1G
|
|||
|
||||
# Fabric properties
|
||||
minecraft_version=1.16.1
|
||||
yarn_mappings=1.16.1+build.17
|
||||
loader_version=0.8.8+build.202
|
||||
yarn_mappings=1.16.1+build.20
|
||||
loader_version=0.8.9+build.203
|
||||
|
||||
#Fabric api
|
||||
fabric_version=0.14.0+build.371-1.16
|
||||
fabric_version=0.14.1+build.372-1.16
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 1.4.6
|
||||
|
|
|
@ -206,7 +206,7 @@ public class SimpleAuth implements DedicatedServerModInitializer {
|
|||
timer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(!SimpleAuth.isAuthenticated(player)) // Kicking player if not authenticated
|
||||
if(!SimpleAuth.isAuthenticated(player) && player.networkHandler.getConnection().isOpen()) // Kicking player if not authenticated
|
||||
player.networkHandler.disconnect(new LiteralText(SimpleAuth.config.lang.timeExpired));
|
||||
}
|
||||
}, SimpleAuth.config.main.delay * 1000);
|
||||
|
|
|
@ -35,8 +35,6 @@ public class AuthEventHandler {
|
|||
return new LiteralText(config.lang.notAuthenticated);
|
||||
}
|
||||
|
||||
private static Text successfulPortalRescue = new LiteralText(config.lang.successfulPortalRescue);
|
||||
|
||||
// Player pre-join
|
||||
// Returns text as a reason for disconnect or null to pass
|
||||
public static LiteralText checkCanPlayerJoinServer(SocketAddress socketAddress, GameProfile profile, PlayerManager manager) {
|
||||
|
|
Loading…
Reference in New Issue