diff --git a/src/main/java/com/gmail/nossr50/database/Database.java b/src/main/java/com/gmail/nossr50/database/Database.java index 6dff65961..0552ace48 100644 --- a/src/main/java/com/gmail/nossr50/database/Database.java +++ b/src/main/java/com/gmail/nossr50/database/Database.java @@ -579,9 +579,9 @@ public final class Database { } private static void printErrors(SQLException ex) { - System.out.println("SQLException: " + ex.getMessage()); - System.out.println("SQLState: " + ex.getSQLState()); - System.out.println("VendorError: " + ex.getErrorCode()); + mcMMO.p.getLogger().severe("SQLException: " + ex.getMessage()); + mcMMO.p.getLogger().severe("SQLState: " + ex.getSQLState()); + mcMMO.p.getLogger().severe("VendorError: " + ex.getErrorCode()); } public static void profileCleanup(String playerName) { diff --git a/src/main/java/com/gmail/nossr50/database/Leaderboard.java b/src/main/java/com/gmail/nossr50/database/Leaderboard.java index 06dfab3f0..8dbd9684e 100644 --- a/src/main/java/com/gmail/nossr50/database/Leaderboard.java +++ b/src/main/java/com/gmail/nossr50/database/Leaderboard.java @@ -279,7 +279,7 @@ public final class Leaderboard { writer.append(line).append("\r\n"); } else { - System.out.println("User found, removing..."); + mcMMO.p.getLogger().info("User found, removing..."); worked = true; continue; //Skip the player } @@ -359,7 +359,7 @@ public final class Leaderboard { writer.append(line).append("\r\n"); } else { - System.out.println("User found, removing..."); + mcMMO.p.getLogger().info("User found, removing..."); removedPlayers++; continue; //Skip the player } diff --git a/src/main/java/com/gmail/nossr50/database/runnables/SQLConversionTask.java b/src/main/java/com/gmail/nossr50/database/runnables/SQLConversionTask.java index 0de52b221..30eb83ea4 100644 --- a/src/main/java/com/gmail/nossr50/database/runnables/SQLConversionTask.java +++ b/src/main/java/com/gmail/nossr50/database/runnables/SQLConversionTask.java @@ -269,7 +269,7 @@ public class SQLConversionTask implements Runnable { } } - System.out.println("[mcMMO] MySQL Updated from users file, " + theCount + " items added/updated to MySQL DB"); + mcMMO.p.getLogger().info("[mcMMO] MySQL Updated from users file, " + theCount + " items added/updated to MySQL DB"); in.close(); } catch (Exception e) { diff --git a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java index c1f9e7ef8..8a4c60f12 100644 --- a/src/main/java/com/gmail/nossr50/listeners/SelfListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/SelfListener.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.listeners; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent; /** @@ -23,7 +24,7 @@ public class SelfListener implements Listener { throw new Exception("Gained negative XP!"); } catch (Exception e) { - System.out.println(e.getMessage()); + mcMMO.p.getLogger().severe(e.getMessage()); e.printStackTrace(); } } diff --git a/src/main/java/com/gmail/nossr50/mcMMO.java b/src/main/java/com/gmail/nossr50/mcMMO.java index 3c5befbca..b481b6727 100644 --- a/src/main/java/com/gmail/nossr50/mcMMO.java +++ b/src/main/java/com/gmail/nossr50/mcMMO.java @@ -507,7 +507,7 @@ public class mcMMO extends JavaPlugin { metrics.start(); } catch (IOException e) { - System.out.println("Failed to submit stats."); + mcMMO.p.getLogger().warning("Failed to submit stats."); } } } diff --git a/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java b/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java index 7e5015126..76f940055 100644 --- a/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java +++ b/src/main/java/com/gmail/nossr50/skills/utilities/SkillType.java @@ -2,6 +2,7 @@ package com.gmail.nossr50.skills.utilities; import org.bukkit.entity.Player; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.util.Permissions; @@ -124,7 +125,7 @@ public enum SkillType { } } - System.out.println("[DEBUG] Invalid mcMMO skill (" + skillName + ")"); + mcMMO.p.getLogger().warning("[DEBUG] Invalid mcMMO skill (" + skillName + ")"); return null; } diff --git a/src/main/java/com/gmail/nossr50/spout/SpoutTools.java b/src/main/java/com/gmail/nossr50/spout/SpoutTools.java index 2ac63fcc4..3478de43d 100644 --- a/src/main/java/com/gmail/nossr50/spout/SpoutTools.java +++ b/src/main/java/com/gmail/nossr50/spout/SpoutTools.java @@ -176,7 +176,7 @@ public class SpoutTools { } if (menuKey == null) { - System.out.println("Invalid KEY for Menu.Key, using KEY_M"); + mcMMO.p.getLogger().warning("Invalid KEY for Menu.Key, using KEY_M"); menuKey = Keyboard.KEY_M; } } diff --git a/src/main/java/com/gmail/nossr50/util/Anniversary.java b/src/main/java/com/gmail/nossr50/util/Anniversary.java index 2b49aaf21..0a0a9ee4b 100644 --- a/src/main/java/com/gmail/nossr50/util/Anniversary.java +++ b/src/main/java/com/gmail/nossr50/util/Anniversary.java @@ -38,7 +38,7 @@ public final class Anniversary { try { anniversaryFile.createNewFile(); } catch (IOException ex) { - System.out.println(ex); + mcMMO.p.getLogger().severe(ex.toString()); } } hasCelebrated = new ArrayList(); @@ -55,7 +55,7 @@ public final class Anniversary { reader.close(); } catch (Exception ex) { - System.out.println(ex); + mcMMO.p.getLogger().severe(ex.toString()); } } @@ -70,7 +70,7 @@ public final class Anniversary { writer.close(); } catch (Exception ex) { - System.out.println(ex); + mcMMO.p.getLogger().severe(ex.toString()); } } diff --git a/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java b/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java index 17f212e55..e1bf22374 100644 --- a/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java +++ b/src/main/java/net/shatteredlands/shatt/backup/ZipLibrary.java @@ -28,7 +28,7 @@ public class ZipLibrary { public static void mcMMObackup() throws IOException { if (Config.getInstance().getUseMySQL()) { - System.out.println("No Backup performed, in SQL Mode."); + mcMMO.p.getLogger().info("No Backup performed, in SQL Mode."); return; } @@ -62,7 +62,7 @@ public class ZipLibrary { } //Actually do something - System.out.println("Backing up your mcMMO Configuration... "); + mcMMO.p.getLogger().info("Backing up your mcMMO Configuration... "); packZip(fileZip, sources); } @@ -82,7 +82,7 @@ public class ZipLibrary { zipOut.flush(); zipOut.close(); - System.out.println("Backup Completed."); + mcMMO.p.getLogger().info("Backup Completed."); } private static String buildPath(String path, String file) { @@ -95,7 +95,7 @@ public class ZipLibrary { private static void zipDir(ZipOutputStream zos, String path, File dir) throws IOException { if (!dir.canRead()) { - System.out.println("Cannot read " + dir.getCanonicalPath() + " (Maybe because of permissions?)"); + mcMMO.p.getLogger().severe("Cannot read " + dir.getCanonicalPath() + " (Maybe because of permissions?)"); return; } @@ -114,7 +114,7 @@ public class ZipLibrary { private static void zipFile(ZipOutputStream zos, String path, File file) throws IOException { if (!file.canRead()) { - System.out.println("Cannot read " + file.getCanonicalPath() + "(File Permissions?)"); + mcMMO.p.getLogger().severe("Cannot read " + file.getCanonicalPath() + "(File Permissions?)"); return; }