Skip to content

Commit

Permalink
Use plugin logger instead of System
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackBeltPanda committed Dec 6, 2021
1 parent 3609c7a commit 7b9abe5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main/java/de/robotricker/transportpipes/TransportPipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import java.nio.file.Paths;
import java.util.Iterator;
import java.util.Objects;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;

Expand All @@ -54,17 +55,17 @@ public class TransportPipes extends JavaPlugin {
public void onEnable() {

if (!Bukkit.getVersion().contains("1.17.1") && !Bukkit.getVersion().contains("1.18")) {
System.err.println("------------------------------------------");
System.err.println("TransportPipes currently only works with Minecraft 1.17.1+.");
System.err.println("------------------------------------------");
getLogger().log(Level.SEVERE, "------------------------------------------");
getLogger().log(Level.SEVERE, "TransportPipes currently only works with Minecraft 1.17.1+.");
getLogger().log(Level.SEVERE, "------------------------------------------");
Bukkit.getPluginManager().disablePlugin(this);
return;
}

if (Files.isRegularFile(Paths.get(getDataFolder().getPath(), "recipes.yml"))) {
System.err.println("------------------------------------------");
System.err.println("Please delete the old plugins/TransportPipes directory so TransportPipes can recreate it with a bunch of new config values");
System.err.println("------------------------------------------");
getLogger().log(Level.SEVERE, "------------------------------------------");
getLogger().log(Level.SEVERE, "Please delete the old plugins/TransportPipes directory so TransportPipes can recreate it with a bunch of new config values");
getLogger().log(Level.SEVERE, "------------------------------------------");
Bukkit.getPluginManager().disablePlugin(this);
return;
}
Expand Down

0 comments on commit 7b9abe5

Please sign in to comment.