Solved In-game reload command

Discussion in 'Plugin Development' started by KarimAKL, Mar 8, 2018.

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

    KarimAKL

    A little late here aswell, sorry. I don't understand what you meant with 2 and 3. :(
     
  2. Offline

    KarimAKL

  3. Offline

    KarimAKL

  4. Offline

    KarimAKL

    @AdamDev I went to look at some of my posts and saw your comment in this post but i didn't understand it back when i answered but i do understand now and i just tried the "plugin.reloadConfig();" and it seems to work fine but how would i do it with a custom config? Like "messages.yml" or something like that?
    EDIT: I think this is the way but i'm not sure tho.
    In main class:
    Code:
    public File whatever1 = new File(this.getDataFolder() + "/fileName.yml");
    public FileConfiguration whatever2 = YamlConfiguration.loadConfiguration(whatever1);
    
    In another class:
    Code:
    try {
        plugin.whatever2.load(plugin.whatever1);
    } catch (IOException | InvalidConfigurationException e) {
        e.printStackTrace();
    }
    
    If this is not the way then what is the way?
    EDIT: Solved. Now that i look at the posts i see that i posted alot of comments here so i'm just gonna edit here instead of making a new comment and i'm sorry for the previous posts. :7
     
    Last edited by a moderator: Jun 3, 2018
Thread Status:
Not open for further replies.

Share This Page