Disable auth in singleplayer

This commit is contained in:
Agatha Lovelace 2022-04-08 19:45:33 +02:00
parent 08f7f3e50e
commit ddfbf4593d
Signed by untrusted user: sorceress
GPG Key ID: 11BBCFC65FC9F401
3 changed files with 6 additions and 2 deletions

View File

@ -161,7 +161,9 @@ public class MixinServerPlayerEntity implements PlayerAuth {
*/
@Override
public boolean canSkipAuth() {
return PlatformSpecific.isPlayerFake(this.player) || (isUsingMojangAccount() && config.main.premiumAutologin);
return PlatformSpecific.isPlayerFake(this.player) ||
this.player.server.isSingleplayer() ||
(isUsingMojangAccount() && config.main.premiumAutologin);
}
/**

View File

@ -54,7 +54,7 @@ public interface PlayerAuth {
/**
* Checks whether player is a fake player (from CarpetMod).
*
* @return true if player is fake (can skip authentication process), otherwise false
* @return true if player is fake or in singleplayer (can skip authentication process), otherwise false
* @see <a href="https://samolego.github.io/SimpleAuth/org/samo_lego/simpleauth/mixin/MixinPlayerEntity.html">See implementation</a>
*/
boolean canSkipAuth();

View File

@ -29,3 +29,5 @@ bytes_version = 1.3.0
# Carpet for debugging
carpet_core_version = 1.4.69+v220331
carpet_branch = master
org.gradle.jvmargs=-Xmx4G