MySQL?

Discussion in 'Plugin Development' started by Sizableshrimp0, Jan 24, 2015.

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

    Sizableshrimp0

    Hello. I am trying to add MySQL to my plugin ServerPack but i cant find a working mysql tutorial. Could someone help me out because when the server restarts the backpack resets. Thx :)
     
  2. Offline

    Skionz

  3. Offline

    Funergy

    @Sizableshrimp0 Well is it for 1 server? or is it something you want to see on websites,... ?
    If not just use your config.yml or create another yml file and there you can store everything.
    And if you definitely want to use MySQL Read the post that @Skionz send you
    and after that go and use Husky's MySQL Library.
     
  4. Offline

    Sizableshrimp0

    [Deleted]

    @Funergy
    How could i use the config.yml to store the backpacks data??

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  5. Offline

    ColonelHedgehog

    ^ Save the ItemStacks (they're configserializables) in lists alongside their corresponding slots (if you care). Then read it back out again by looping through the list.
     
  6. Offline

    Sizableshrimp0

    How would i do that with the inventory?? Im new to itemstacks
     
  7. Offline

    ColonelHedgehog

    Well, you would loop through the ItemStack[] array (which you get from Inventory#getContents()), and then save it to a config.
     
Thread Status:
Not open for further replies.

Share This Page