Solved Bukkit.getServer().unloadWorld("arena", (Boolean) true);

Discussion in 'Plugin Development' started by lrdemolition, Aug 29, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    lrdemolition

    Bukkit.getServer().unloadWorld("arena", (Boolean) true);

    does that unload a world, and what is the boolean for?
    im doing this to delete a world and nether world:
    Code:
                    Bukkit.getServer().unloadWorld("arena", (Boolean) true);
                    Bukkit.getServer().unloadWorld("arena_nether", (Boolean) true);
                    File f = (File) Bukkit.getWorld("arena").getWorldFolder();
                    File fn = (File) Bukkit.getWorld("arena").getWorldFolder();
                    if (Bukkit.getWorld("arena").getWorldFolder().isDirectory()) {
                            for (File c : f.listFiles())
                              c.delete();
                            f.delete();
                    }
                    if (Bukkit.getWorld("arena_nether").getWorldFolder().isDirectory()) {
                        for (File c : f.listFiles())
                          c.delete();
                        f.delete();
                  }
     
  2. Offline

    AoH_Ruthless

    lrdemolition
    Why the heck are you casting boolean to true ... ?
     
  3. Offline

    Gater12

  4. Offline

    fireblast709

    lrdemolition Documentation galore! Do note that you cannot delete the main world, nor the nether and end world which have the same name.

    [note]: same name as in 'world' and 'world_nether'
     
  5. Offline

    lrdemolition

Thread Status:
Not open for further replies.

Share This Page