Map Reset

Discussion in 'Plugin Development' started by Landen22, Nov 23, 2014.

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

    Landen22

    Hey I developed a Bedwars plugin and I have a problem with the MapReset.

    Here is the one I use:

    Code:java
    1. public void onDisbale(){
    2.  
    3. System.out.println("Mapreset.");
    4. resetMap("BW1");
    5. }
    6.  
    7.  
    8. public static void unloadMap(String world){
    9. Bukkit.getServer().unloadWorld(world, false);
    10. }
    11.  
    12. public static void loadMap(String world){
    13. Bukkit.getServer().createWorld(new WorldCreator(world));
    14. }
    15.  
    16. public static void resetMap(String mapName){
    17. unloadMap(mapName);
    18. loadMap(mapName);
    19. }


    If you have a better idea please tell me.

    Coding on 1.5.2
     
  2. Offline

    Gater12

  3. Offline

    Skionz

  4. Offline

    Landen22


    It just dont reset the Map.
     
  5. Offline

    Gater12

    Landen22
    Turn off the world auto-save.
     
  6. Offline

    Landen22


    It is off
     
Thread Status:
Not open for further replies.

Share This Page