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 e4de100e0..f896f2151 100644 --- a/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java +++ b/src/main/java/emu/grasscutter/server/http/documentation/HandbookHandler.java @@ -25,8 +25,13 @@ public final class HandbookHandler implements Router { * found. */ public HandbookHandler() { + if (!HANDBOOK.enable) { + this.serve = false; + return; + } + this.handbook = new String(FileUtils.readResource("/html/handbook.html")); - this.serve = HANDBOOK.enable && this.handbook.length() > 0; + this.serve = !this.handbook.isEmpty(); var server = HANDBOOK.server; if (this.serve && server.enforced) {