Storing data

Discussion in 'Plugin Development' started by pale1, Jul 25, 2016.

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

    pale1

    Hey guys. I'm brand new to developing plugins and I have a few questions.

    I want to save some stats and a custom inventory of items for each player. Where are some places to store this data? What are some methods of storing data?

    What sort of classes and methods I might need to update the data or view it?
     
  2. @pale1
    There are two main approaches, either you could store the data in plain text files (YAML, json, properties etc), or you could use a database like MySQL.
     
  3. Offline

    Zombie_Striker

    @AlvinB @pale1
    MySQL is overboard for most bukkit plugins. If you only have one server/ have a connection between all your servers, then just use a text file. If you have multiple computers that can't access files on another system, then use MySQL.
     
    AlvinB likes this.
  4. What about SQLite?

    But yaml would be the easiest, because ItemStacks are ConfigurationSerializable
     
  5. Offline

    pale1

  6. @pale1
    If you are planning to use text files, YAML is probably your best bet, since bukkit has built in classes for this. This article is a pretty good read on how to use those classes.
     
    pale1 likes this.
Thread Status:
Not open for further replies.

Share This Page