3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-19 14:30:17 +01:00

Don't try to show the server settings form to players who are not logged in (#4387)

* Don't show the server settings form to players who are not yet logged in

* Add brackets to if statement
Dieser Commit ist enthalten in:
chris 2024-01-20 12:03:32 +01:00 committet von GitHub
Ursprung 509e00c138
Commit 16f9f0d94f
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194

Datei anzeigen

@ -42,6 +42,11 @@ public class BedrockServerSettingsRequestTranslator extends PacketTranslator<Ser
@Override @Override
public void translate(GeyserSession session, ServerSettingsRequestPacket packet) { public void translate(GeyserSession session, ServerSettingsRequestPacket packet) {
// UUID is null when we're not logged in, which causes the hasPermission check to fail
if (!session.isLoggedIn()) {
return;
}
CustomForm form = SettingsUtils.buildForm(session); CustomForm form = SettingsUtils.buildForm(session);
int formId = session.getFormCache().addForm(form); int formId = session.getFormCache().addForm(form);