mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-24 11:33:36 +00:00
fix(handbook): Skip reading handbook from resources if it is disabled
This commit is contained in:
parent
655016c92e
commit
446e994ff0
@ -25,8 +25,13 @@ public final class HandbookHandler implements Router {
|
|||||||
* found.
|
* found.
|
||||||
*/
|
*/
|
||||||
public HandbookHandler() {
|
public HandbookHandler() {
|
||||||
|
if (!HANDBOOK.enable) {
|
||||||
|
this.serve = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.handbook = new String(FileUtils.readResource("/html/handbook.html"));
|
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;
|
var server = HANDBOOK.server;
|
||||||
if (this.serve && server.enforced) {
|
if (this.serve && server.enforced) {
|
||||||
|
Loading…
Reference in New Issue
Block a user