3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-27 08:30:12 +01:00
Dieser Commit ist enthalten in:
EOT3000 2019-08-05 22:14:41 -04:00
Ursprung 7fccb0d69d
Commit b66631407b

Datei anzeigen

@ -47,6 +47,7 @@ import com.nukkitx.protocol.bedrock.packet.StartGamePacket;
import com.nukkitx.protocol.bedrock.packet.TextPacket; import com.nukkitx.protocol.bedrock.packet.TextPacket;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import org.geysermc.api.Geyser;
import org.geysermc.api.Player; import org.geysermc.api.Player;
import org.geysermc.api.RemoteServer; import org.geysermc.api.RemoteServer;
import org.geysermc.api.session.AuthData; import org.geysermc.api.session.AuthData;
@ -126,6 +127,7 @@ public class GeyserSession implements PlayerSession, Player {
public void authenticate(String username) { public void authenticate(String username) {
authenticate(username, ""); authenticate(username, "");
Geyser.addPlayer(this);
} }
public void authenticate(String username, String password) { public void authenticate(String username, String password) {
@ -204,6 +206,7 @@ public class GeyserSession implements PlayerSession, Player {
@Override @Override
public void onDisconnect(String reason) { public void onDisconnect(String reason) {
downstream.getSession().disconnect("Disconnected from server. Reason: " + reason); downstream.getSession().disconnect("Disconnected from server. Reason: " + reason);
Geyser.removePlayer(this);
} }
public void setAuthenticationData(AuthData authData) { public void setAuthenticationData(AuthData authData) {