Solved Generating and storing data in a .yml

Discussion in 'Plugin Development' started by Giorgio, Oct 14, 2012.

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

    Giorgio

    Hello everyone ive been looking around for a tutorial that teaches how to store data to a separate .yml file in side your plugins folder. Then when an Administrator want's to check a players ip they do /ip <player> and it gives them all the ips they logged from.
     
  2. Offline

    CorrieKay

  3. Offline

    Giorgio

    CorrieKay

    Ok but its a bit confusing to me, Does anyone have a simple code I can see that is an EventHandler and logs data to a file?
     
  4. Offline

    CorrieKay

    sure, one of my static methods does just that
    "path" is the location of the directory that you wish to place the logged file in, if you started in your own plugins data folder. (it doesnt support being able to place them in the data folder, but you can easily fix that.)
    "fileName" is the name of the file. something like, "log.txt" would suffice.
    and of course, "messageToLog" is the message you would like to log. it also appends a new line to the message too, so no need to include that.
     
  5. Offline

    Sagacious_Zed Bukkit Docs

  6. Offline

    Giorgio

    CorrieKay
    Ok perfect example thank you. SOLVED
     
    CorrieKay likes this.
Thread Status:
Not open for further replies.

Share This Page