Skip to content

Commit

Permalink
feat(Config): 更新配置文件和日志输出
Browse files Browse the repository at this point in the history
  • Loading branch information
shulng committed Sep 20, 2024
1 parent 3e80f84 commit 1b3dc55
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/main/java/cc/baka9/catseedlogin/bungee/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.util.logging.Logger;

import net.md_5.bungee.config.Configuration;
import net.md_5.bungee.config.ConfigurationProvider;
import net.md_5.bungee.config.YamlConfiguration;
import net.md_5.bungee.config.ConfigurationProvider;

public class Config {

Expand All @@ -17,7 +16,6 @@ public class Config {
public static int Port;
public static String LoginServerName;
public static String AuthKey;
private static final Logger logger = PluginMain.instance.getLogger();

public static void load() {
File dataFolder = PluginMain.instance.getDataFolder();
Expand All @@ -42,12 +40,9 @@ public static void load() {
Port = config.getInt("Port");
LoginServerName = config.getString("LoginServerName");
AuthKey = config.getString("AuthKey");

// 合并日志输出
String logBuilder = "Host: " + Host + "\n" +
"Port: " + Port + "\n" +
"LoginServerName: " + LoginServerName;
logger.info(logBuilder);
PluginMain.instance.getLogger().info("Host:" + Host);
PluginMain.instance.getLogger().info("Port:" + Port);
PluginMain.instance.getLogger().info("LoginServerName:" + LoginServerName);
} catch (IOException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 1b3dc55

Please sign in to comment.