[MISC] InventorySQL - (copy) Player inventory on MySQL table [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by ThisIsAreku, Jul 14, 2011.

  1. Offline

    tha d0ctor

    wow if knew how to program

    do you have any corresponding PHP code for us to do something like that?
     
  2. Offline

    phito

    !
    Merci, ça marche! :D

    ---

    Thanks it work !

    Petit problème sur le script PHP, quand j'ajoute un objet, rien ne se passe :/

    ----

    Small problem with the PHP script, when I add an object, nothing happens: /

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  3. @tha d0ctor : Not for the moment, since it's not finished, and personalized for my server, so I can't release it. But maybe later... ;)

    @phito : Oui, j'ai trouvé un gros bug, je vais mettre la nouvelle version
    --
    Yes, I've found a large issue, I am currently uploading the fixed version
     
  4. Offline

    phito


    Merci beaucoup, vraiment un très bon plugin que tu as fait :)

    --
    Thank you very much, really great plugin you've done :)
     
  5. Offline

    Ultrawipf

    Im not sure how to set up the database/table.
    Minecraft bukkit:
    14:29:17 [INFO] [InventorySQL] Enabling...

    14:29:38 [SCHWERWIEGEND] [InventorySQL] SQLException! Communications link failur
    e

    The last packet sent successfully to the server was 0 milliseconds ago. The driv
    er has not received any packets from the server.
    14:29:38 [INFO] [InventorySQL] MySQL connection successful <---- ?!


    i use phpmyadmin for mysql how i can get the database working?

    i tried set it up manually but i failed ;(
     
  6. @Ultrawipf : Are you sure that your options are set correctly ?
    the "MySQL connection successful" after the exception is a mistake on my part..
     
  7. Offline

    Ultrawipf

    No im not sure ;) can you please send me an example so i can see where are my faults?
     
  8. @Ultrawipf
    Okay, for example this is my configuration file :
    Code:
    db: 'minecraft'
    host: 'localhost'
    check-interval: 600
    table: 'InventorySQL'
    user: 'root'
    pass: '1234'
    1. 'db' is the database name in the MySQL server. The database has to exist, the plugin cannot create it
    2. 'host' is the address of the MySQL server. If like me your server is in the same computer as the Minecraft server, put 'localhost'
    3. 'check-interval' is the interval in seconds between each refresh of the MySQL table. in addition, an individual refresh is made when the player drop or pick an item.
    4. 'table' is the table name, created if not exist
    5. 'user' is the username of the MySQL server
    6. 'pass' is .. the password (really)
     
  9. Offline

    Ultrawipf

    ohh my fault -.- i had the wrong hostname ;) now it works great
     
  10. Offline

    mrvertigo27

    can someone link to a working example, i am having trouble envisioning exactly what this plugin is about...

    from what i can gather it
    • copies a users inventory to mysql
    • allows a web user to manipulate that data using the mysql table
    • does not yet have a robust enough interface to manipulate it using iconomy or donations setup
    • places changes into a "pending" area in mysql (when does this get written to the players .dat file?)
    it seems like it could be a powerful tool or at least part of a really powerful tool however I am having trouble wrapping my mind around this concept. Can we have some real world usage examples?
     
  11. Offline

    digga

    Hi,

    I am having some Problems with this, the things which are negative in the pending colum arent done. It seems like it just ignores them.
     
  12. Yes, I've already found this issue.. But for the moment, I don't know why; sometimes contents is parsed but not added..
    for the moment I have some conputer problems, but I'm still coding
     
  13. Offline

    RugRats

    Is this better then normal flatfile that minecraft provides?
     
  14. Offline

    digga

    I hope u will fix this soon, cause ur plugin is the heart of my webinterface :p
     
  15. @digga
    Oh. Okay. I see.
    The regular expression doesn't match negative values for pendings items.
    I could change it, but is it worth it? Do you need to give items with negative values?

    This plugin is not intended to replace the basic inventories files. With InventorySQL, you make a copy of the inventory on a mysql table, to edit it afterward

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  16. Offline

    digga

    The negative Value for items is to remove Items from a players inventory, or? So i tried to remove 3 dirt from my invenotry but nothing happens. I hope u can fix this or u can explain me how i can remove thinks from other players.
     
  17. can you post the data of the columns 'pendings' ?
    Also, are you you sure you do not make a mistake in the syntax?
    take a look at : https://github.com/ThisIsAreku/InventorySQL/blob/master/web/index.php#L39
    PHP:
    $dat '['.$_POST['item_action'].'('.$item_id.':'.$item_byte.')x'.$item_count.']';
    $_POST['item_action'] can be "+" or "-" (adding/deleting item)
    '$ item_count' is not expected to be negative
     
  18. Offline

    untergrundbiber

  19. Offline

    digga

    My pendings colum looks like this [-(13:0)x3].
    I am using Bukkit 1000 and the newest version of your plugin and ur webinteface to test arround.

    If i add sth to players it works wonderfull but remove sth it just notice it and delete the content of the pending colum but dont remove sth from the invenotry.
     
  20. Oh yeah, maybe I will draw on this site

    I haven't a computer right here, but I will fix it as soon as possible
     
  21. Offline

    digga

    Ok, thx u for this. I love u plugin ;)
     
  22. Offline

    topsub

    love this idea.. what i am using on my website now. More of a visually guide to what you have in your inventory
     
  23. Offline

    mario713

    Code:
    14:49:41 [WARNING] [InventorySQL] Error at SQL Query: No operations allowed after connection closed.Connection was implicitly closed by the driver.
    14:49:41 [SEVERE] java.lang.NullPointerException
    14:49:41 [SEVERE]       at alexoft.InventorySQL.UpdateDatabase.playerLogic(UpdateDatabase.java:119)
    14:49:41 [SEVERE]       at alexoft.InventorySQL.UpdateDatabase.run(UpdateDatabase.java:203)
    14:49:41 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    14:49:41 [SEVERE]       at java.lang.Thread.run(Thread.java:619)
    
    i have that error :( can someone tell me how to fix it? it happens after some time in game
     
  24. Offline

    _Hayleigh_

    Any chance of getting an option to load the sql data to the inventory .dat file on server load?

    This would stop the problem when the server crashes and inventorys get rolled back. Otherwise I believe this plugin would save the rolled back inventorys to the sql.
     
  25. Offline

    BananAx3

    Hey.
    Can you make a Batch file (.sql) ?
    Thank you :)

    Lg Friskyx3 ;)
     
  26. Offline

    tiga05

    Why should I store the Inventory of the User in a MYQL-Database?
     
  27. Offline

    Jonchun

    I've been planning to experiment with this but haven't had the time yet... But from what I understand, you are still storing the inventory flatfile. This plugin just reads the file and "copies" the inventory into an SQL database so you can read it from external places (PHP for example). However, since the SQL table is only a copy and not actually accessed by the bukkit server, there is a column in the SQL table where you can input changes that you want done. The changes will be parsed by the plugin after ___ seconds (configurable) so it BASICALLY works like you are storing the inventory in a database.

    @Areku, I know I should really DL the plugin first, but how does you plugin distinguish between user inventories? Another column named users? (Sorry no access to my home computer right now)

    Out of curiosity, does Orvale mean anything in French? ._.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  28. There is 4 columns : id, player, inventory, pendings
    You're right, the column 'inventory' is a copy of the flatfile, the column 'pendings' is parsed by the plugin to add/remove items.
    Each player has a line in the table with with his inventory
     
  29. Offline

    Jonchun

Share This Page