fixed bedrock bugs

This commit is contained in:
jannis committed 2026-11-06 17:31:09 +01:00
1 parent acb7b17eb0
commit 7c0de3d0f7
2 files changed
+6 -5

No files matched your search

@@ -77,8 +77,7 @@ public final class Api {
JsonElement error = json.get("error"); JsonElement error = json.get("error");
if (error != null && error.isJsonPrimitive()) message = error.getAsString(); if (error != null && error.isJsonPrimitive()) message = error.getAsString();
} catch (RuntimeException ignored) {} } catch (RuntimeException ignored) {}
throw new SignupError(code, "Signup fehlgeschlagen (" + status + "/" + code + "): " + message throw new SignupError(code, "Request: " + body + "\nResponse: " + response.body());
+ " [username=" + username + ", uuid=" + uuid + ", edition=" + edition + "]");
} }
private static HttpResponse<String> call(String method, String path, String body, boolean withAuth) { private static HttpResponse<String> call(String method, String path, String body, boolean withAuth) {
@@ -149,10 +149,12 @@ public final class Dialog {
for (String rule : rules) { for (String rule : rules) {
body.add(plain(Component.text(rule), rulesWidth)); body.add(plain(Component.text(rule), rulesWidth));
} }
boolean bedrock = PlayerHandler.isBedrockUuid(player.getUuid());
body.add(plain(Component.text() body.add(plain(Component.text()
.append(link("Datenschutzerklärung", privacyUrl)) .append(bedrock ? Component.text(privacyUrl) : link("Datenschutzerklärung", privacyUrl))
.append(Component.text(" | ")) .append(Component.text(" | "))
.append(link("Vollständige Regeln", rulesUrl)) .append(bedrock ? Component.text(rulesUrl) : link("Vollständige Regeln", rulesUrl))
.build(), rulesWidth)); .build(), rulesWidth));
} }
case privacy -> { case privacy -> {
@@ -192,7 +194,7 @@ public final class Dialog {
if (state.isLastPage()) buttons.add(button("Anmeldung abschließen", finishKey)); if (state.isLastPage()) buttons.add(button("Anmeldung abschließen", finishKey));
else buttons.add(button("Weiter →", nextKey, state.isFirstPage() ? cancelWidth : buttonWidth)); else buttons.add(button("Weiter →", nextKey, state.isFirstPage() ? cancelWidth : buttonWidth));
if (!state.isFirstPage()) buttons.add(bedrock ? 1 : 0, button("← Zurück", backKey)); if (!state.isFirstPage()) buttons.add(bedrock ? 1 : 0, button("← Zurück", backKey));
buttons.add(button("Anmeldung abbrechen", cancelKey, cancelWidth)); if(state.isFirstPage()) buttons.add(button("Anmeldung abbrechen", cancelKey, cancelWidth));
player.showDialog(new net.minestom.server.dialog.Dialog.MultiAction( player.showDialog(new net.minestom.server.dialog.Dialog.MultiAction(
new DialogMetadata( new DialogMetadata(