Advertisement
iSach

Delete world | Bukkit

Aug 12th, 2015
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.48 KB | None | 0 0
  1.     /**
  2.      * Supprime un monde Bukkit après l'avoir unload.
  3.      * @param worldName Le nom du monde.
  4.      */
  5.     public static void deleteWorld(String worldName) {
  6.         World world = Bukkit.getWorld(worldName);
  7.         File f = new File(worldName);
  8.         if(f == null || world == null) return;
  9.         Bukkit.unloadWorld(world, false);
  10.         try {
  11.             FileUtils.deleteDirectory(f);
  12.         } catch (IOException e) {
  13.             e.printStackTrace();
  14.         }
  15.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement