Solved Path name for user generated configs?

Discussion in 'Plugin Development' started by EgyptianKing, Sep 5, 2014.

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

    EgyptianKing

    So I have this config.yml that looks like this:

    Code:
    Chests:
      Menu1:
        Items:
      Menu2:
        Items:
    But I want all the menu names to be able to be changed by the user. (Player can rename Menu1 to Swords or something)

    Generally I would use Chests.Menu1.Items for my path, but since the Menu1 can be anything the user wants, what would be the path?
     
  2. Offline

    _Filip

  3. Offline

    Creeoer

    EgyptianKing
    You could do something like:

    Code:java
    1. //Args[1] would be the user input
    2.  
    3. Chest. + args[1] + Items


    Of course, if you want input , in let's say a command.
     
    EgyptianKing likes this.
Thread Status:
Not open for further replies.

Share This Page