Backpack Plugin / Mysql set

Discussion in 'Plugin Development' started by TheDevZone, Oct 11, 2015.

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

    TheDevZone

    hey,
    im coding a minez plugin and i dont have an idea how to save backpacks.
    i cant use files, my server is to big for that.
    I thought about a mysql table, but i dont know how to save the data inside exactly.
    Please help me.

    best regards :)
     
  2. Offline

    Zombie_Striker

    @TheDevZone
    Lol wat. Even 1000+ player severs can use files for each individual person online. They (and as such you) can even store the whole Inventory instance into one Config if you wanted.
    Barely anyone who uses MySQL for minecarft server needs it. You are not one of those people.

    Stick to saving the whole inventory (or if you're really worried about memory usage, just save the itemstacks inside the inventory) instance to a config.
     
  3. Offline

    TheDevZone

    The Plugin is already 160kb big, an there are ~50.000 inventory instances which had to be saved.
    The server is really big (500 Players constantly) and exists since 2011. So there are really many players.
    It already supports mysql (Stats system, Level system, Ban System, etc.). Are there any opportunities to save it in mysql? i dont want to use the harddisk any time i read/write data out/into of/the the file.

    Wrong words, i think my server is to big for that. :D

    And sorry 4 my bad english, im german.
     
  4. Offline

    Zombie_Striker

    @TheDevZone
    Yes and? Kilobytes is not that large compared to modern day computers. also, the size of the save file should not even get close to that.
    I think you mean 50,000 instead of 50.
    This and the quote above both don't matter. The size of the file created would not be that important. Expecially if you know how to remove data.
    Again, you are not one of the people who need sql

    Did you know that sql saves files to a harddisk? ITS TRUE! That's how it saves data between startups. In fact, most likely you are using up more memory saving these objects to SQL than if you just put the data into a text file. There is no real reason to not want to save a file to a computer.
     
  5. Offline

    TheDevZone

    Nah, Async MySQL and chaching the data is better than files i think.
    I know, i have a root server. But i think sql is better than yml files from bukkit.
     
  6. Offline

    Zombie_Striker

    @TheDevZone
    A YML file simply stores a value connected to a path (Which can be made to not take up that much memory).

    SQLS Have to save 1)The Database 2) The Table 3) the columns 4)The Object that is used to get the object 5) The actual object/value and 6) anything connected to it.

    Yml files are smaller and a better choice for this.
     
  7. Offline

    TheDevZone

Thread Status:
Not open for further replies.

Share This Page