system exit calls break minecraft; fixed

This commit is contained in:
Bryson Steck 2021-09-13 15:36:15 -06:00
parent dac7cd790d
commit 63d5c6dcb2
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
package net.brysonsteck.Resurrection.startup; package net.brysonsteck.Resurrection.startup;
import net.brysonsteck.Resurrection.Resurrection;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
@ -55,13 +56,13 @@ public class ParseSettings {
"[Resurrection] Example: \"debug=false\""); "[Resurrection] Example: \"debug=false\"");
} }
System.out.println("[Resurrection] This file is crucial to Resurrection. Since the file is not complete, the plugin will now stop."); System.out.println("[Resurrection] This file is crucial to Resurrection. Since the file is not complete, the plugin will now stop.");
System.exit(1); Bukkit.getPluginManager().disablePlugin(JavaPlugin.getProvidingPlugin(Resurrection.class));
} }
} catch (IOException e) { } catch (IOException e) {
System.out.println("[Resurrection] There was an issue reading the Settings file:"); System.out.println("[Resurrection] There was an issue reading the Settings file:");
e.printStackTrace(); e.printStackTrace();
System.out.println("[Resurrection] This file is crucial to Resurrection. Since the file is not complete, the plugin will now stop."); System.out.println("[Resurrection] This file is crucial to Resurrection. Since the file is not complete, the plugin will now stop.");
System.exit(1); Bukkit.getPluginManager().disablePlugin(JavaPlugin.getProvidingPlugin(Resurrection.class));
} }
} }