Skip to content

Commit

Permalink
Don't try to show the server settings form to players who are not log…
Browse files Browse the repository at this point in the history
…ged in (#4387)

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

* Add brackets to if statement
  • Loading branch information
onebeastchris authored Jan 20, 2024
1 parent 509e00c commit 16f9f0d
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ public class BedrockServerSettingsRequestTranslator extends PacketTranslator<Ser

@Override
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);
int formId = session.getFormCache().addForm(form);

Expand Down

0 comments on commit 16f9f0d

Please sign in to comment.