Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. @Override
  2. public void onDisable() {
  3.  
  4. if(current == State.FINISH){
  5.  
  6. World unload = Bukkit.getWorld("world");
  7. World copy = Bukkit.getWorld("copy");
  8. Bukkit.unloadWorld(unload, false);
  9.  
  10.  
  11. File WorldFile = new File(unload.getName());
  12. File worldCopyFile = new File(copy.getName());
  13. worldUtils.deleteWorld(WorldFile);
  14.  
  15.  
  16. try{
  17. worldUtils.copyFolder(worldCopyFile, WorldFile);
  18. }catch(IOException e){ e.printStackTrace();}
  19. }
  20.  
  21. if(this.villager != null){
  22. this.villager.remove();
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement