Add return statement after plugin disablement

Added a return statement after the plugin disablement step in the PreventStabby main class. This ensures that the execution of the function is explicitly stopped if there are any issues with command registration.
This commit is contained in:
2024-04-16 16:29:43 +02:00
parent c369c110e5
commit 7f74826e2c
@@ -46,6 +46,7 @@ public final class PreventStabby extends JavaPlugin {
getLogger().severe("Error with registering commands."); getLogger().severe("Error with registering commands.");
getLogger().severe("Plugin will now disable."); getLogger().severe("Plugin will now disable.");
getServer().getPluginManager().disablePlugin(this); getServer().getPluginManager().disablePlugin(this);
return;
} }
MainCommand mainCommand = new MainCommand(); MainCommand mainCommand = new MainCommand();
pvpCommand.setExecutor(mainCommand); pvpCommand.setExecutor(mainCommand);