diff --git a/src/handbook/src/backend/types.ts b/src/handbook/src/backend/types.ts index df08d4e73..dafce45a9 100644 --- a/src/handbook/src/backend/types.ts +++ b/src/handbook/src/backend/types.ts @@ -136,9 +136,9 @@ export type CommandResponse = { }; export type WindowDetails = { - address: string, - port: number, - disable: boolean + address: string; + port: number; + disable: boolean; }; /** diff --git a/src/handbook/src/utils.ts b/src/handbook/src/utils.ts index 559783a8b..d20dff55f 100644 --- a/src/handbook/src/utils.ts +++ b/src/handbook/src/utils.ts @@ -174,11 +174,8 @@ export function getWindowDetails(): WindowDetails { const { address, port, disable } = details; return { - address: address == "{{DETAILS_ADDRESS}}" ? - "127.0.0.1" : address, - port: port == "{{DETAILS_PORT}}" ? - 443 : parseInt(port), - disable: disable == "{{DETAILS_DISABLE}}" ? - false : disable == "true" + address: address == "{{DETAILS_ADDRESS}}" ? "127.0.0.1" : address, + port: port == "{{DETAILS_PORT}}" ? 443 : parseInt(port), + disable: disable == "{{DETAILS_DISABLE}}" ? false : disable == "true" }; } diff --git a/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java b/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java index 07bfa709f..b7a43ba19 100644 --- a/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java +++ b/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java @@ -1,5 +1,7 @@ package emu.grasscutter.server.http.documentation; +import static emu.grasscutter.config.Configuration.HANDBOOK; + import emu.grasscutter.Grasscutter; import emu.grasscutter.auth.AuthenticationSystem.AuthenticationRequest; import emu.grasscutter.server.http.Router; @@ -11,8 +13,6 @@ import io.javalin.Javalin; import io.javalin.http.ContentType; import io.javalin.http.Context; -import static emu.grasscutter.config.Configuration.HANDBOOK; - /** Handles requests for the new GM Handbook. */ public final class HandbookHandler implements Router { private String handbook; @@ -32,7 +32,7 @@ public final class HandbookHandler implements Router { this.handbook .replace("{{DETAILS_ADDRESS}}", server.address) .replace("{{DETAILS_PORT}}", String.valueOf(server.port)) - .replace("{{DETAILS_DISABLE}}", Boolean.toString(!server.canChange)); + .replace("{{DETAILS_DISABLE}}", Boolean.toString(server.canChange)); } }