mirror of
https://github.com/songoda/SongodaCore.git
synced 2025-01-22 07:21:21 +01:00
Fix Exception when calling #emergencyStop inside onPluginEnable
This commit is contained in:
parent
73685b62dd
commit
ed7b454625
@ -48,7 +48,7 @@ public abstract class SongodaPlugin extends JavaPlugin {
|
||||
* <br>
|
||||
* Do not include language files if you are using the Core's localization system.
|
||||
*/
|
||||
public abstract List<SongodaYamlConfig> getConfigs();
|
||||
public abstract @NotNull List<SongodaYamlConfig> getConfigs();
|
||||
|
||||
@Override
|
||||
public final void onLoad() {
|
||||
@ -82,6 +82,10 @@ public abstract class SongodaPlugin extends JavaPlugin {
|
||||
// plugin setup
|
||||
onPluginEnable();
|
||||
|
||||
if (this.emergencyStop) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Load Data.
|
||||
Bukkit.getScheduler().runTaskLater(this, this::onDataLoad, this.dataLoadDelay);
|
||||
|
||||
@ -205,7 +209,7 @@ public abstract class SongodaPlugin extends JavaPlugin {
|
||||
protected void criticalErrorOnPluginStartup(Throwable th) {
|
||||
Bukkit.getLogger().log(Level.SEVERE,
|
||||
String.format(
|
||||
"Unexpected error while loading %s v%s c%s: Disabling plugin!",
|
||||
"Unexpected error while loading %s v%s (core v%s): Disabling plugin!",
|
||||
getDescription().getName(),
|
||||
getDescription().getVersion(),
|
||||
SongodaCore.getCoreLibraryVersion()
|
||||
|
Loading…
Reference in New Issue
Block a user