mirror of
https://github.com/exzork/GCAuth.git
synced 2025-01-30 14:08:36 +00:00
change logging
This commit is contained in:
parent
f270a954a6
commit
b129e90848
@ -12,6 +12,7 @@ import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
|
||||
public class GCAuth extends Plugin {
|
||||
@ -26,16 +27,16 @@ public class GCAuth extends Plugin {
|
||||
try {
|
||||
Files.createDirectories(configFile.toPath().getParent());
|
||||
} catch (IOException e) {
|
||||
Grasscutter.getLogger().error("[GCAuth] Failed to create config.json");
|
||||
getLogger().error("[GCAuth] Failed to create config.json");
|
||||
}
|
||||
}
|
||||
loadConfig();
|
||||
Grasscutter.setAuthenticationSystem(new GCAuthAuthentication());
|
||||
Grasscutter.getLogger().info("[GCAuth] GCAuth Enabled!");
|
||||
getLogger().info("[GCAuth] GCAuth Enabled!");
|
||||
config.jwtSecret = Authentication.generateRandomString(32);
|
||||
saveConfig();
|
||||
if (Grasscutter.getConfig().account.autoCreate) {
|
||||
Grasscutter.getLogger().warn("[GCAuth] GCAuth does not support automatic account creation. Please disable in the server's config.json or just ignore this warning.");
|
||||
getLogger().warn("[GCAuth] GCAuth does not support automatic account creation. Please disable in the server's config.json or just ignore this warning.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,7 +59,7 @@ public class GCAuth extends Plugin {
|
||||
try (FileWriter file = new FileWriter(configFile)) {
|
||||
file.write(gson.toJson(config));
|
||||
} catch (Exception e) {
|
||||
Grasscutter.getLogger().error("[GCAuth] Unable to save config file.");
|
||||
getLogger().error("[GCAuth] Unable to save config file.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user