forked from sorceress/EasyAuth
Preventing #41 from happening in the future
This commit is contained in:
parent
a1ce6b578f
commit
5a6f4f57aa
|
@ -119,8 +119,12 @@ public class AuthEventHandler {
|
|||
if(config.main.sessionTimeoutTime != -1)
|
||||
playerCache.validUntil = System.currentTimeMillis() + config.main.sessionTimeoutTime * 1000;
|
||||
}
|
||||
else if(config.main.spawnOnJoin)
|
||||
else if(config.main.spawnOnJoin) {
|
||||
((PlayerAuth) player).hidePosition(false);
|
||||
|
||||
player.setInvulnerable(!config.experimental.playerInvulnerable);
|
||||
player.setInvisible(!config.experimental.playerInvisible);
|
||||
}
|
||||
}
|
||||
|
||||
// Player chatting
|
||||
|
|
|
@ -102,18 +102,16 @@ public class MixinServerPlayerEntity implements PlayerAuth {
|
|||
}
|
||||
|
||||
/**
|
||||
* Sets the authentication status of the player.
|
||||
* Sets the authentication status of the player
|
||||
* and hides coordinates if needed.
|
||||
*
|
||||
* @param authenticated whether player should be authenticated
|
||||
*/
|
||||
@Override
|
||||
public void setAuthenticated(boolean authenticated) {
|
||||
PlayerCache playerCache = playerCacheMap.get(this.getFakeUuid());
|
||||
if(this.isAuthenticated() == authenticated)
|
||||
return;
|
||||
playerCache.isAuthenticated = authenticated;
|
||||
|
||||
|
||||
player.setInvulnerable(!authenticated && config.experimental.playerInvulnerable);
|
||||
player.setInvisible(!authenticated && config.experimental.playerInvisible);
|
||||
|
||||
|
@ -167,7 +165,8 @@ public class MixinServerPlayerEntity implements PlayerAuth {
|
|||
|
||||
/**
|
||||
* Whether the player is using the mojang account.
|
||||
* @return true if paid, otherwise false
|
||||
*
|
||||
* @return true if they are using mojang account, otherwise false
|
||||
*/
|
||||
@Override
|
||||
public boolean isUsingMojangAccount() {
|
||||
|
|
Loading…
Reference in New Issue