@@ -71,33 +71,29 @@ private void enable() {
7171 try {
7272 CommentedConfigurationNode node = loader .load ();
7373 settings = node .getValue (TypeToken .of (SettingsHolder .class ));
74- } catch (Exception e ) {
75- e .printStackTrace ();
76- }
7774
78- mainCommand = new MainCommand (this );
79- getProxy ().getPluginManager ().registerCommand (this , mainCommand );
75+ mainCommand = new MainCommand (this );
76+ getProxy ().getPluginManager ().registerCommand (this , mainCommand );
8077
81- if (settings .getGeneralProps ().isEnabled ()) {
82- if (settings .getGeneralProps ().isSilent ()) {
83- getLogger ().setLevel (Level .WARNING );
84- }
78+ if (settings .getGeneralProps ().isEnabled ()) {
79+ if (settings .getGeneralProps ().isSilent ()) {
80+ getLogger ().setLevel (Level .WARNING );
81+ }
8582
86- if (settings .getGeneralProps ().isAutoReload ()) {
87- reloadListener = new ProxyReloadListener (this );
88- getProxy ().getPluginManager ().registerListener (this , reloadListener );
89- }
83+ if (settings .getGeneralProps ().isAutoReload ()) {
84+ reloadListener = new ProxyReloadListener (this );
85+ getProxy ().getPluginManager ().registerListener (this , reloadListener );
86+ }
9087
91- try {
92- new BungeeUpdater (this , 10788 );
93- } catch (IOException e ) {
94- e .printStackTrace ();
95- }
88+ try {
89+ new BungeeUpdater (this , 10788 );
90+ } catch (IOException e ) {
91+ e .printStackTrace ();
92+ }
9693
97- networkManager = new NetworkManager (this );
98- sectionManager = new SectionManager (this );
94+ networkManager = new NetworkManager (this );
9995
100- try {
96+ sectionManager = new SectionManager ( this );
10197 sectionManager .load ();
10298
10399 statusManager = new StatusManager (this );
@@ -131,16 +127,16 @@ private void enable() {
131127 }
132128
133129 getLogger ().info ("The plugin has finished loading without any problems" );
134- } catch (RuntimeException e ) {
135- this .failed = true ;
136- getLogger ().severe ("The plugin could not continue loading due to an unexpected exception" );
137- e .printStackTrace ();
130+ } else {
131+ getLogger ().warning ("-----------------------------------------------------" );
132+ getLogger ().warning ("WARNING: This plugin is disabled, do not forget to set enabled on the config to true" );
133+ getLogger ().warning ("Nothing is going to work until you do that, you can reload me by using the /balancer command" );
134+ getLogger ().warning ("-----------------------------------------------------" );
138135 }
139- } else {
140- getLogger ().warning ("-----------------------------------------------------" );
141- getLogger ().warning ("WARNING: This plugin is disabled, do not forget to set enabled on the config to true" );
142- getLogger ().warning ("Nothing is going to work until you do that, you can reload me by using the /balancer command" );
143- getLogger ().warning ("-----------------------------------------------------" );
136+ } catch (Exception e ) {
137+ this .failed = true ;
138+ getLogger ().severe ("The plugin could not continue loading due to an unexpected exception" );
139+ e .printStackTrace ();
144140 }
145141 }
146142
0 commit comments