Solved How to loop through a config stringlist.

Discussion in 'BungeeCord Plugin Development' started by black_, Jun 6, 2017.

  1. Hi. I need some help with my plugin. I want to be able to run the commands under a config stringlist.
    For example, in the config:
    -bc hello
    -f join adad

    And other commands of the sort. I already have the dispatch command, as well as a few other things. Any help is appreciated.
  2. ex using streams and console as the sender:

    Code (Java):
    getConfig().getStringList("").forEach(s -> Bukkit.dispatchCommand(Bukkit.getConsoleSender(), s));
  3. Never seen forEach() before, thanks!