Skip to content

Commit

Permalink
change Denizen init order to prevent bork errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Aug 29, 2019
1 parent 5964582 commit 927b003
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions plugin/src/main/java/com/denizenscript/denizen/Denizen.java
Expand Up @@ -135,6 +135,19 @@ public NotableManager notableManager() {
*/
@Override
public void onEnable() {
try {
versionTag = this.getDescription().getVersion();

// Load Denizen's core
DenizenCore.init(coreImplementation);
}
catch (Exception e) {
e.printStackTrace();
getServer().getPluginManager().disablePlugin(this);
startedSuccessful = false;
return;
}

if (!NMSHandler.initialize(this)) {
getLogger().warning("-------------------------------------");
getLogger().warning("This build of Denizen is not compatible with this Spigot version! Deactivating Denizen!");
Expand All @@ -153,18 +166,11 @@ public void onEnable() {
}

try {
versionTag = this.getDescription().getVersion();

// Load Denizen's core
DenizenCore.init(coreImplementation);

// Activate dependencies
Depends.initialize();

if (Depends.citizens == null || !Depends.citizens.isEnabled()) {
getLogger().warning("Citizens does not seem to be activated! Denizen will have greatly reduced functionality!");
//getServer().getPluginManager().disablePlugin(this);
//return;
}
startedSuccessful = true;
}
Expand Down

0 comments on commit 927b003

Please sign in to comment.