How to get the plugin to print text from file to screen

Discussion in 'Plugin Development' started by TheGeekGizmo, Aug 11, 2012.

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

    TheGeekGizmo

    Hay ya,

    so at the moment I am trying to make a plugin, but I have a problem. The plugin on a command puts some text on one line, then goes down a line, and if the command is done it puts the chosen text on that line. I would like to know if there was a was for me to, when a command is executed, list out all the text in that file, with each new line separated by a " ,"

    Thanks for anyhelp
     
  2. Offline

    Deleted user

    In your config.yml

    Code:
    message: This is your message.
    
    Somewhere in your main class..
    Code:
    public String MSG = null;
    
    In your onEnable()
    Code:
    MSG= getConfig().getString("message", "This is a default message. It will display this if it cannot find what it's looking for!");
    
     
  3. Offline

    TheGeekGizmo

    No the thing is, on a cmd run it run sothing to print like
    Code:
    line1 ,line2 ,line3
    into the chat. So i can put it in a .sendMessage

    the file where the text comes from is like this,
    Code:
    line1
    line2
    line3
    line4
    somerandomstuff
    na_dafhng
    what im saying is its not in a config.yml, its in a .txt and not a config file

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
Thread Status:
Not open for further replies.

Share This Page