diff --git a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/game/Game.java b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/game/Game.java index 620fbb6a..272ef7ef 100644 --- a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/game/Game.java +++ b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/game/Game.java @@ -497,7 +497,7 @@ public void broadcast(String message) { public void startForPlayer(Player player) { MWPlayer mwPlayer = getPlayer(player); if (mwPlayer == null) { - System.err.println("[MissileWars] Error starting game at player " + player.getName()); + Logger.ERROR.log("Error starting game at player " + player.getName()); return; } diff --git a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/OrcInventory.java b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/OrcInventory.java index 580c619b..003bc4e1 100644 --- a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/OrcInventory.java +++ b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/OrcInventory.java @@ -18,15 +18,17 @@ package de.butzlabben.missilewars.inventory; -import java.util.HashMap; -import java.util.Map.Entry; -import java.util.Objects; +import de.butzlabben.missilewars.Logger; import lombok.Getter; import org.bukkit.Bukkit; import org.bukkit.entity.Player; import org.bukkit.event.inventory.InventoryType; import org.bukkit.inventory.Inventory; +import java.util.HashMap; +import java.util.Map.Entry; +import java.util.Objects; + @Getter public abstract class OrcInventory { @@ -112,7 +114,7 @@ public Inventory getInventory(Player p, String title) { if (entry.getKey() >= 0 && entry.getKey() < size) { inv.setItem(entry.getKey(), entry.getValue().getItemStack(p)); } else { - System.err.println("There is a problem with a configured Item!"); + Logger.ERROR.log("There is a problem with a configured Item!"); } } @@ -136,7 +138,7 @@ public Inventory getInventory() { if (entry.getKey() >= 0 && entry.getKey() < size) { inv.setItem(entry.getKey(), entry.getValue().getItemStack()); } else { - System.err.println("There is a problem with a configured Item!"); + Logger.ERROR.log("There is a problem with a configured Item!"); } } return inv; diff --git a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/pages/InventoryPage.java b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/pages/InventoryPage.java index 214f88a2..7a46655f 100644 --- a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/pages/InventoryPage.java +++ b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/inventory/pages/InventoryPage.java @@ -18,6 +18,7 @@ package de.butzlabben.missilewars.inventory.pages; +import de.butzlabben.missilewars.Logger; import de.butzlabben.missilewars.inventory.OrcInventory; import de.butzlabben.missilewars.inventory.OrcItem; import de.butzlabben.missilewars.util.version.VersionUtil; @@ -62,7 +63,7 @@ public Inventory getInventory(Player p) { public void addItem(OrcItem item) { if (i > 36) { - System.err.println("More items than allowed in page view"); + Logger.ERROR.log("More items than allowed in page view"); return; } addItem(i, item); diff --git a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/ConnectionHolder.java b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/ConnectionHolder.java index 9f8e0272..39677e3e 100644 --- a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/ConnectionHolder.java +++ b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/ConnectionHolder.java @@ -63,7 +63,7 @@ public static void close() { synchronized (lock) { try { if (connection == null || connection.isClosed()) { - System.err.println("[MySQL] Connection does not exist or was already closed"); + Logger.ERROR.log("[MySQL] Connection does not exist or was already closed"); return; } connection.close(); diff --git a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/SetupUtil.java b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/SetupUtil.java index 891e75de..c6b931b1 100644 --- a/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/SetupUtil.java +++ b/missilewars-plugin/src/main/java/de/butzlabben/missilewars/util/SetupUtil.java @@ -147,7 +147,7 @@ private static void copyFile(String resource, String out) { InputStream in = MissileWars.getInstance().getResource(resource); Files.copy(in, file.toPath()); } catch (IOException e) { - System.err.println("Wasn't able to create Config"); + Logger.ERROR.log("Wasn't able to create Config"); e.printStackTrace(); } }