File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
adventure-editor/src/main/java/com/bladecoder/engineeditor/model Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -462,10 +462,12 @@ public void loadChapter(String selChapter) throws IOException {
462
462
chapter .load (selChapter );
463
463
} catch (SerializationException ex ) {
464
464
// check for not compiled custom actions
465
- if (ex .getCause () != null && ex .getCause ().getCause () != null
466
- && ex .getCause ().getCause () instanceof ClassNotFoundException ) {
465
+ if (ex .getCause () != null && ex .getCause () instanceof ClassNotFoundException ) {
467
466
EditorLogger .debug ("Custom action class not found. Trying to compile..." );
468
467
if (RunProccess .runGradle (Ctx .project .getProjectDir (), "desktop:compileJava" )) {
468
+ FolderClassLoader folderClassLoader = new FolderClassLoader (projectFile .getAbsolutePath ()
469
+ + "/core/build/classes/main" );
470
+ ActionFactory .setActionClassLoader (folderClassLoader );
469
471
chapter .load (selChapter );
470
472
} else {
471
473
throw new IOException ("Failed to run Gradle." );
You can’t perform that action at this time.
0 commit comments