Config file reading

Discussion in 'BungeeCord Plugin Development' started by dominikremes, May 27, 2018.

  1. Hello. So I have a spigot server and I want to change it to a bungeecord server with 3 spigot + 1 bungeecord server, but I have 1 big plugin that I have splitten up to 3 smaller ones. (1 for minigame, 1 for survival and 1 for lobby), but my problem is with the configuration files. I need to acces the same ones from each server, so now I have something like this:

    BungeeServer --> /plugins/myplugin/configFiles(secondary)
    LobbyServer --> /plugins/myplugin/configFiles(primary)
    SurvivalServer --> /plugins/myplugin/configFiles(read)
    MinigamesServer --> /plugins/myplugin/configFiles(read)

    configFiles(primary) means that if possible, I would like to store them there because it's the main server/plugin

    configFiles(secondary) means that if I can't store them on configFiles(primary) then I'd like to store them there, There is no part of the plugin on that server, so I need a way to create them there also, but it is possible to do

    configFiles(read) means that there is a part of the plugin, but it would only read the config files from configFiles(primary) or configFiles(secondary) (depends on what is possible).

    I'm using spigot-1.12.2 in the plugin path, not BungeeCord.

    So my question is that how is configFiles(read) possible?\

    I have found a way with plugin message channeling, but when I get the info back for some reason the notifyAll() is not working, because I have set wait() while the info doesn't arrive back. Is there an other way to receive the info I get bac or to connect the config files?

    #1 dominikremes, May 27, 2018
    Last edited: May 28, 2018
  2. I guess you could solve this by creating a softlink in the suberservers config folder pointing to the config file in your lobby directory.
    However when doing it by programming, taking a close look at Java IO might be the solution.
  3. How about using SQL?
    • Winner Winner x 1
  4. SQL for configs isn't a very good idea
  5. with an import/export system, it could be great.
    • Agree Agree x 1