[Q] Read offline inventory

Discussion in 'Plugin Development' started by ColdIce, Jan 21, 2011.

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



    I want to know how to read offline inventories.

    I got to know how the player_name.dat is written: NBT.
    So now I want to know how to get all the inventory items from the player_name.dat with stack size and return to a player.

    Thanks if you help me out! :)

    Edit another time, player_name.dat uses NBT.
  2. Offline


    I'm not certain there's a good answer to your question.

    You would need to build a parser to read and process the NBT file and extract the elements corresponding to the inventory items. This is certainly doable, but it's a reasonable amount of work. There are some obfuscated classes that do can it, but the complications of using them may make writing your own a more desirable approach.

    On the other hand, perhaps someone out there on the toobz has written something they're giving away under an open source license. Maybe a search on the hMod forums will turn something up.

    I wish I could be of greater assistance. [​IMG]
Thread Status:
Not open for further replies.

Share This Page