1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Inventory on transfer

Discussion in 'Development' started by Infernus101, May 1, 2017.

  1. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    Is there a way to keep the inventory of the player when he transfers?
     
  2. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    no, unless you own both servers you can try slowtransfer or a linked DB for player inv
     
  3. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    Yea i own both, and wym by slowtransfer and linked db?
     
  4. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    linked MYSQL database would be an valid example
    1st server write to db
    2nd sever fetch items from db
     
  5. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Or just link the "players" folder of either servers with the other.
     
  6. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Never thought of that LOL
     
    Muqsit likes this.
  7. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    How?
     
  8. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Linux:
    Code:
    ln -s /path/to/full/directory/of/players /path/to/server2/directory
    
    If your server is hosted on a Windows system, check this.
     
  9. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    But i don't have root access, its Multicraft
     
  10. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    That's bad. You are very limited to stuff that you can do. Buy a VPS/Dedicated server. I don't think you can get the best solutions while you're using multicraft. Just my two cents...
     
  11. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    But mysql could work right?
     
  12. Muqsit

    Muqsit Chicken

    Messages:
    1,548
    GitHub:
    muqsit
    Yes but you'll have to save the gzip-compressed (NBT) inventory into mysql. (You can refer to this code to check how I did that).
    You'll also have to fetch the inventory from mysql every time the player logs in. (Both the tasks should be done asynchronously, or expect a ton of lag o/).
    So the better option is to link folders.
     
    Infernus101 likes this.
  13. Infernus101

    Infernus101 Witch

    Messages:
    54
    GitHub:
    infernus102
    Yea i see, but how can you do it asynchronously o_O
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.