mirror of
https://github.com/BGHDDevelopment/PlayerBalancer.git
synced 2024-09-17 10:14:10 +02:00
Handle configuration exceptions too
This commit is contained in:
parent
5dd49b4caa
commit
d773800a0d
@ -2,5 +2,6 @@
|
||||
|
||||
mkdir libs
|
||||
cd libs
|
||||
|
||||
powershell -Command "Invoke-WebRequest https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar -OutFile BungeeCord.jar"
|
||||
mvn install:install-file -Dfile=BungeeCord.jar -DgroupId=net.md-5 -DartifactId=bungeecord-proxy -Dversion=local -Dpackaging=jar
|
4
setup.sh
4
setup.sh
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mkdir libs && cd "$_"
|
||||
mkdir libs
|
||||
cd libs
|
||||
|
||||
wget https://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar
|
||||
mvn install:install-file -Dfile=BungeeCord.jar -DgroupId=net.md-5 -DartifactId=bungeecord-proxy -Dversion=local -Dpackaging=jar
|
@ -71,9 +71,6 @@ public class PlayerBalancer extends Plugin {
|
||||
try {
|
||||
CommentedConfigurationNode node = loader.load();
|
||||
settings = node.getValue(TypeToken.of(SettingsHolder.class));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
mainCommand = new MainCommand(this);
|
||||
getProxy().getPluginManager().registerCommand(this, mainCommand);
|
||||
@ -95,9 +92,8 @@ public class PlayerBalancer extends Plugin {
|
||||
}
|
||||
|
||||
networkManager = new NetworkManager(this);
|
||||
sectionManager = new SectionManager(this);
|
||||
|
||||
try {
|
||||
sectionManager = new SectionManager(this);
|
||||
sectionManager.load();
|
||||
|
||||
statusManager = new StatusManager(this);
|
||||
@ -131,17 +127,17 @@ public class PlayerBalancer extends Plugin {
|
||||
}
|
||||
|
||||
getLogger().info("The plugin has finished loading without any problems");
|
||||
} catch (RuntimeException e) {
|
||||
this.failed = true;
|
||||
getLogger().severe("The plugin could not continue loading due to an unexpected exception");
|
||||
e.printStackTrace();
|
||||
}
|
||||
} else {
|
||||
getLogger().warning("-----------------------------------------------------");
|
||||
getLogger().warning("WARNING: This plugin is disabled, do not forget to set enabled on the config to true");
|
||||
getLogger().warning("Nothing is going to work until you do that, you can reload me by using the /balancer command");
|
||||
getLogger().warning("-----------------------------------------------------");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
this.failed = true;
|
||||
getLogger().severe("The plugin could not continue loading due to an unexpected exception");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private void disable() {
|
||||
|
Loading…
Reference in New Issue
Block a user