Solved Saving world in a config file

Discussion in 'Plugin Development' started by cdnyassuo34, Aug 28, 2019.

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

    cdnyassuo34

    Hi, I am creating a plugin and I am trying to load a world from a config file
    but I have no clue about what to use ... I would be happy if anyone help me ^^
     
    Last edited: Aug 28, 2019
  2. Offline

    KarimAKL

    @cdnyassuo34 Save a world how? You can save the world's name if you want to get which world to do something with.
     
  3. Offline

    cdnyassuo34

    I saved it with
    Code:
    public World mainworld;
    ...
    getConfig().set("mainworld" , mainworld); //saver
    ...
    mainworld = e.getPlayer.getLocation().getWorld();
    
    But i don't know how to load it

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Aug 28, 2019
  4. Offline

    KarimAKL

    @cdnyassuo34 Save the world's name and then get the world by using Bukkit.getWorld(String name)
     
  5. Offline

    cdnyassuo34

    Oh ok thanks
     
Thread Status:
Not open for further replies.

Share This Page