Fixed NoClassDefFoundError if WorldEdit failed to initialize

This commit is contained in:
Intelli 2021-01-02 20:05:27 -07:00 committed by wizjany
parent 282425f3cf
commit 04d5a3b437
1 changed files with 2 additions and 0 deletions

View File

@ -385,6 +385,8 @@ public class WorldGuardPlugin extends JavaPlugin {
Plugin worldEdit = getServer().getPluginManager().getPlugin("WorldEdit");
if (worldEdit == null) {
throw new CommandException("WorldEdit does not appear to be installed.");
} else if (!worldEdit.isEnabled()) {
throw new CommandException("WorldEdit does not appear to be enabled.");
}
if (worldEdit instanceof WorldEditPlugin) {