Saving Plugin

Discussion in 'Plugin Development' started by kaZep, Jul 27, 2012.

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

    kaZep

    Hey everyone again, i want to make a plugin to set player color, like '/setcolor <name> <color>'. I know how to do it, but i don't know to save my color. So let me explain you more, i'm writing /setcolor kazep red , ok? Now, i stop the server and i start it again, i want to be my color saved. How can i do that?!
     
  2. Offline

    Firefly

    Write each player's color to a config file.
     
  3. Offline

    kaZep

    Firefly Explain please.. How can i write them? How can i save them.
     
  4. Offline

    Firefly

  5. Offline

    kaZep

    Firefly i know to save the config, but i don't know how to add players at it, to save them.
     
  6. Offline

    Firefly

    That link tells you everything you need to know.
     
  7. Offline

    kaZep

    Firefly I can't understand... seriously. Please give me a code to understand what's the trick. Please :D i'm trying to do that by 5 days!
     
  8. Offline

    nisovin

    There are many, many plugins that save data to file. Look at the source of one of those. It's probably the best way to learn.
     
  9. Offline

    kaZep

    nisovin give me the most easyer example. please :D
     
  10. Offline

    d33k40

    u cant learn if you copy-pasta, he provide you a link that say all to know

    try code, and then show ur question
     
  11. Offline

    kaZep

    d33k40 i really love you, and your tring to help me. You really light my mind to learn correctly java. I'll try to code, and after i'll ask if is it correct.
     
  12. Offline

    d33k40

    no problem dude :)
     
  13. Offline

    kaZep

    Bump. I tried 5 hours. I didn't do anything! please one code, i want to look how is the best way. please !!

    Bump. I'm so dispered. Please help!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  14. Offline

    JamEngulfer221

    Ok, what you want to do is save the player's name to the file with a separator and a colour value. Then you want to write some code that gets the whole line and separates the text from each side of the separator and writes it to a variable.

    Then you just have to write something that assigns the colour to the name and applies it.
     
Thread Status:
Not open for further replies.

Share This Page