Solved Using YAMLConfiguration to print a whole file to cmdsender

Discussion in 'Plugin Development' started by 615283, Feb 14, 2018.

Thread Status:
Not open for further replies.
  1. I have a .yml file which contains something like the below:
    Code:
    item 1
    item2
    454543ser
    546tegerg
    54tg
    ertg
    i.e. a list of random junk
    how can I send this in lines to a command sender from a command ideally using sender.sendMessage()
     
  2. Online

    timtower Administrator Administrator Moderator

    @615283 Read the file, loop over the values, send lines.
     
  3. I know that's what I need to do, I just need to know the code of how to do that.
     
  4. Online

    timtower Administrator Administrator Moderator

    @615283 What part of it? What have you tried?
     
  5. I have tried using a scanner but I have been told that YamlConfiguration is better. But I have no idea how to use it so I need to see some code for how to read that list to a player
     
  6. Online

    timtower Administrator Administrator Moderator

    @615283 Is it an actual formatted yml file or just lines in a fike with a yml extension?
    And we won't spoonfeed
     
  7. It's just lines in a file with a yml extension.
     
  8. Online

    timtower Administrator Administrator Moderator

    @615283 Then you need a scanner
     
  9. Ok thanks, marking as solved.
     
Thread Status:
Not open for further replies.

Share This Page