Solved Cosmetic Help

Discussion in 'Spigot Plugin Help' started by Frogsoup, May 22, 2016.

  1. Hello everyone, I'm currently working on a private project that I use just to help expand my knowledge and see where I can improve. I was thinking about trying to add somewhat of a cosmetic feature like hats, costumes, particles, etc. and I was wondering what would be the best way to save that cosmetic for each player.

    For example; Player A would unlock a workbench hat from a crate and would now be able to put it on their head whereas Player B would not be able to put it on unless they unlocked it from the crate. I was curious on what would be the best way to save the hat Player A unlocked despite them logging off or the server restarting/reloading.

    : I'm not asking for you to supply me with the code. I would appreciate just a detailed description and if absolutely necessary the layout of the code where not everything is given. (I'm not that good with MySQL just yet, so if this is the best option I would appreciate some help in a more detailed description).
  2. There would be several ways to go about this, however, here would be some points.

    Larger network and or larger data manipulation
    • Some type of database usage (MySQL, SQLite, Oracle Database..)
    Of course, this is also a great option if you are going to be connecting and sharing information across server platforms.

    Standalone server and or minimal to intermediate amount of data manipulation
    • Information saved into a plugin generated folder

    A possible way to do this, of several, would be multi-value options, specifically boolean values.

    cosmetic A = false not obtained
    cosmetic B = true obtained
    #2 ChefJava, May 22, 2016
    Last edited: May 22, 2016
    • Like Like x 1
    • Winner Winner x 1
  3. In the sense of saving information efficiently, I think it would be easier to use a database. How would I go about creating the tables and other necessary factors for this? Any help would be appreciated.
  4. bump, would really like some help with this! :)
  5. bumb #2
  6. I don't usually answer help threads because I'm busy. I remember being in your shoes once.

    Here is what I do when developing on my computer in regards to MySQL databases. Install wamp server (google it) and use its database to save your data. It comes with phpmyadmin which you can use to create and manipulate your data.

    There are many tutorials on wamp, phpmyadmin, Java, and database manipulation. If you truly don't want to be spoon fed and your willing to do your own research, then this post is all you need to point you in the right direction.

    Important Tip:
    If you use wamp, make sure you download the visual c++ libraries it needs to work. If you get errors during the installation telling you you are missing a DLL file then you will have to uninstall wamp and install the forementioned libraries. Then reinstall it after you restart your computer.
    • Useful Useful x 1