mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix auth type check from merge conflict
This commit is contained in:
parent
88fc3cf843
commit
6702c59a15
1 changed files with 3 additions and 1 deletions
|
@ -26,6 +26,8 @@
|
||||||
package org.geysermc.connector.network.translators.bedrock;
|
package org.geysermc.connector.network.translators.bedrock;
|
||||||
|
|
||||||
import com.nukkitx.protocol.bedrock.packet.SetLocalPlayerAsInitializedPacket;
|
import com.nukkitx.protocol.bedrock.packet.SetLocalPlayerAsInitializedPacket;
|
||||||
|
|
||||||
|
import org.geysermc.common.AuthType;
|
||||||
import org.geysermc.connector.entity.PlayerEntity;
|
import org.geysermc.connector.entity.PlayerEntity;
|
||||||
import org.geysermc.connector.network.session.GeyserSession;
|
import org.geysermc.connector.network.session.GeyserSession;
|
||||||
import org.geysermc.connector.network.translators.PacketTranslator;
|
import org.geysermc.connector.network.translators.PacketTranslator;
|
||||||
|
@ -38,7 +40,7 @@ public class BedrockPlayerInitializedTranslator extends PacketTranslator<SetLoca
|
||||||
if (!session.getUpstream().isInitialized()) {
|
if (!session.getUpstream().isInitialized()) {
|
||||||
session.getUpstream().setInitialized(true);
|
session.getUpstream().setInitialized(true);
|
||||||
|
|
||||||
if (!(session.getConnector().getConfig().getRemote().getAuthType().hashCode() == "online".hashCode())) {
|
if (!(session.getConnector().getAuthType() == AuthType.OFFLINE)) {
|
||||||
session.getConnector().getLogger().info("Attempting to login using offline mode... authentication is disabled.");
|
session.getConnector().getLogger().info("Attempting to login using offline mode... authentication is disabled.");
|
||||||
session.authenticate(session.getAuthData().getName());
|
session.authenticate(session.getAuthData().getName());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue