Solved Storing player points. WITHOUT MYSQL

Discussion in 'Plugin Development' started by ChrisStarr32, Aug 2, 2014.

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

    ChrisStarr32

    I need some help storing player points without using mySql databases.
    I have never really worked with configs or storing player data. Help, anyone?

    Thanks,
    Chris :)
     
  2. Offline

    Gater12

  3. Offline

    ChrisStarr32

    Any tips?
     
  4. Offline

    nzkiwi.5000

    Make a YAML like this one
    Code:text
    1.  
    2. points:
    3. jack: 89
    4. john: 123
    5. susan: 39
    6.  


    Of course the names are players' names.

    and for further questions see the link in the post above
     
  5. Offline

    PandazNWafflez

    nzkiwi.5000 Erm no, don't store player names... Store player UUIDs.
     
  6. Offline

    nzkiwi.5000

    Ah, i forgot :p
     
  7. What kind of storage?
    What kind of points?
    You can add something like this:
    Code:java
    1. getConfig().set(player.getName()
    2. + ".points", playerpoints.get(0)); /*replace playerpoints.get(0) with the place where your points are.*\


    Then you will get like this
    Code:
    _DarkRanger:
      points: (whatever was in playerpoints(0))
     
  8. Offline

    nzkiwi.5000

    good way, but using path points.uuid could be then retrieved from bigger data yaml struct by ConfigurationSection class
    and aslo like PandazNWafflez said store player UUID due to upcoming (or maybe already published :p) name changing update
     
  9. Offline

    1Rogue

    Why on earth would you not use SQL. Its sole existence is literally to solve your exact problem.
     
  10. Offline

    nzkiwi.5000

    I think OP has hosting not allowing databases (common for cheap ones) or he's just too lazy to code database
     
  11. Offline

    1Rogue


    SQLite does not require a MySQL setup, and it's not hard (there are numerous resources if he doesn't feel like writing the ~20 lines to manage it himself)
     
  12. Offline

    nzkiwi.5000

    i know (i coded sqlite) so OP's too lazy (or he is scared of databases). whatever.
     
  13. Offline

    mythbusterma

    It is possible without MySQL, use SQLite.
     
  14. Offline

    nzkiwi.5000

Thread Status:
Not open for further replies.

Share This Page