@@ -485,6 +485,7 @@ public void addShutdownHook() {
485485 .forEach (PlatformChunkGenerator ::close );
486486
487487 MultiBurst .burst .close ();
488+ MultiBurst .ioBurst .close ();
488489 services .clear ();
489490 });
490491 Runtime .getRuntime ().addShutdownHook (shutdownHook );
@@ -566,7 +567,7 @@ public void onDisable() {
566567 postShutdown .forEach (Runnable ::run );
567568 super .onDisable ();
568569
569- J .attempt (new JarScanner (instance .getJarFile (), "" , false )::scan );
570+ J .attempt (new JarScanner (instance .getJarFile (), "" , false )::scanAll );
570571 }
571572
572573 private void setupPapi () {
@@ -706,7 +707,11 @@ public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
706707 Iris .debug ("Generator Config: " + w .toString ());
707708
708709 File ff = new File (w .worldFolder (), "iris/pack" );
709- if (!ff .exists () || ff .listFiles ().length == 0 ) {
710+ var files = ff .listFiles ();
711+ if (files == null || files .length == 0 )
712+ IO .delete (ff );
713+
714+ if (!ff .exists ()) {
710715 ff .mkdirs ();
711716 service (StudioSVC .class ).installIntoWorld (getSender (), dim .getLoadKey (), w .worldFolder ());
712717 }
@@ -716,13 +721,13 @@ public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
716721
717722 @ Nullable
718723 public static IrisDimension loadDimension (@ NonNull String worldName , @ NonNull String id ) {
719- var data = IrisData . get ( new File (Bukkit .getWorldContainer (), String .join (File .separator , worldName , "iris" , "pack" ) ));
720- var dimension = data . getDimensionLoader ().load (id );
721- if (dimension == null ) dimension = IrisData .loadAnyDimension (id );
724+ File pack = new File (Bukkit .getWorldContainer (), String .join (File .separator , worldName , "iris" , "pack" ));
725+ var dimension = pack . isDirectory () ? IrisData . get ( pack ). getDimensionLoader ().load (id ) : null ;
726+ if (dimension == null ) dimension = IrisData .loadAnyDimension (id , null );
722727 if (dimension == null ) {
723728 Iris .warn ("Unable to find dimension type " + id + " Looking for online packs..." );
724729 Iris .service (StudioSVC .class ).downloadSearch (new VolmitSender (Bukkit .getConsoleSender ()), id , false );
725- dimension = IrisData .loadAnyDimension (id );
730+ dimension = IrisData .loadAnyDimension (id , null );
726731
727732 if (dimension != null ) {
728733 Iris .info ("Resolved missing dimension, proceeding." );
@@ -741,7 +746,7 @@ public void splash() {
741746 String padd2 = Form .repeat (" " , 4 );
742747 String [] info = {"" , "" , "" , "" , "" , padd2 + C .IRIS + " Iris" , padd2 + C .GRAY + " by " + "<rainbow>Volmit Software" , padd2 + C .GRAY + " v" + C .IRIS + getDescription ().getVersion ()};
743748 if (unstablemode ) {
744- info = new String []{"" , "" , "" , "" , "" , padd2 + C .RED + " Iris" , padd2 + C .GRAY + " by " + C .DARK_RED + "Volmit Software" , padd2 + C .GRAY + " v" + C .RED + getDescription ().getVersion ()};
749+ info = new String []{"" , "" , "" , "" , "" , padd2 + C .RED + " Iris" , padd2 + C .GRAY + " by " + C .DARK_RED + "Volmit Software" , padd2 + C .GRAY + " v" + C .RED + getDescription ().getVersion ()};
745750 }
746751 if (warningmode ) {
747752 info = new String []{"" , "" , "" , "" , "" , padd2 + C .GOLD + " Iris" , padd2 + C .GRAY + " by " + C .GOLD + "Volmit Software" , padd2 + C .GRAY + " v" + C .GOLD + getDescription ().getVersion ()};
0 commit comments