From 0a86e41542822698838fb7630f0d30e58210f2b3 Mon Sep 17 00:00:00 2001 From: "Tomachi [ICHIGO]" Date: Tue, 25 Jan 2022 05:06:26 +0900 Subject: [PATCH] fix: System.out.print --- .../com/jaoafa/mymaid4/event/Event_MCBansLoginCheck.java | 2 +- .../com/jaoafa/mymaid4/event/Event_NewPlayerAutoBlMap.java | 6 +++--- src/main/java/com/jaoafa/mymaid4/lib/MyMaidLibrary.java | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/jaoafa/mymaid4/event/Event_MCBansLoginCheck.java b/src/main/java/com/jaoafa/mymaid4/event/Event_MCBansLoginCheck.java index 46b115e8e..2198bf32c 100644 --- a/src/main/java/com/jaoafa/mymaid4/event/Event_MCBansLoginCheck.java +++ b/src/main/java/com/jaoafa/mymaid4/event/Event_MCBansLoginCheck.java @@ -157,7 +157,7 @@ public void run() { JSONObject json; try (Response response = client.newCall(request).execute()) { if (response.code() != 200) { - System.out.printf("OnLoginAfterCheck: APIサーバへの接続に失敗: %s -> %d%n", url, response.code()); + Main.getMyMaidLogger().info("OnLoginAfterCheck: APIサーバへの接続に失敗: %s -> %d%n".formatted(url, response.code())); response.close(); return; } diff --git a/src/main/java/com/jaoafa/mymaid4/event/Event_NewPlayerAutoBlMap.java b/src/main/java/com/jaoafa/mymaid4/event/Event_NewPlayerAutoBlMap.java index 6ee63bf11..b26458196 100644 --- a/src/main/java/com/jaoafa/mymaid4/event/Event_NewPlayerAutoBlMap.java +++ b/src/main/java/com/jaoafa/mymaid4/event/Event_NewPlayerAutoBlMap.java @@ -78,12 +78,12 @@ public void run() { Response response = client.newCall(request).execute(); if (response.code() != 200 && response.code() != 302) { - System.out.printf("NewPlayerAutoBlMap: APIサーバへの接続に失敗: %d %s\nhttps://jaoafa.com/cp/?uuid=%s%n", response.code(), Objects.requireNonNull(response.body()).string(), player.getUniqueId()); + Main.getMyMaidLogger().info("NewPlayerAutoBlMap: APIサーバへの接続に失敗: %d %s\nhttps://jaoafa.com/cp/?uuid=%s".formatted(response.code(), Objects.requireNonNull(response.body()).string(), player.getUniqueId())); response.close(); return; } if (response.body() == null) { - System.out.printf("NewPlayerAutoBlMap: APIサーバへの接続に失敗: response.body() is null.\nhttps://jaoafa.com/cp/?uuid=%s%n", player.getUniqueId()); + Main.getMyMaidLogger().info("NewPlayerAutoBlMap: APIサーバへの接続に失敗: response.body() is null.\nhttps://jaoafa.com/cp/?uuid=%s".formatted(player.getUniqueId())); response.close(); return; } @@ -91,7 +91,7 @@ public void run() { ResponseBody body = response.body(); if (body == null) { - System.out.printf("NewPlayerAutoBlMap: ブロック編集マップ取得失敗: body is null.\nhttps://jaoafa.com/cp/?uuid=%s%n", player.getUniqueId()); + Main.getMyMaidLogger().info("NewPlayerAutoBlMap: ブロック編集マップ取得失敗: body is null.\nhttps://jaoafa.com/cp/?uuid=%s".formatted(player.getUniqueId())); return; } diff --git a/src/main/java/com/jaoafa/mymaid4/lib/MyMaidLibrary.java b/src/main/java/com/jaoafa/mymaid4/lib/MyMaidLibrary.java index bca11279f..3e7089902 100644 --- a/src/main/java/com/jaoafa/mymaid4/lib/MyMaidLibrary.java +++ b/src/main/java/com/jaoafa/mymaid4/lib/MyMaidLibrary.java @@ -532,7 +532,7 @@ public static void debug(String message) { if (!Main.getMyMaidConfig().isDevelopmentServer()) { return; } - System.out.printf("DEBUG -> %s%n", message); + Main.getMyMaidLogger().info("DEBUG -> %s".formatted(message)); } public static NamedTextColor getNamedTextColor(String color) {