Read player's DAT file from the last world they were in

Discussion in 'Plugin Development' started by Callum Aitchison, Nov 19, 2011.

Thread Status:
Not open for further replies.
  1. Hi,
    I was wondering how you can read a given player's DAT file from the world they were last in for a new feature for my plugin. How can I do this? I'd like information such as their location when they left and their inventory.
    Thanks.
     
  2. Offline

    DDoS

    I can't seem to find anything in the java docs. I suggest going to the CraftBukkit source, to the CraftPlayer class, and looking at the loadData() method (depends on inheritance, if they're using handles, you'll have to look at the net.minecraft package). You might need to retrace it back to the Minecraft server sources. If you can find the source code for loading it, then you should be able to implement it in your plugin. (for copyright reasons, don't just copy paste in code from the source, work from it).
     
  3. Why not use an OfflinePlayer?
     
  4. The person I asked this question for (the developer of the plugin for my backend) cannot work out how to get the inventory and position from that.
    How would you do it?
     
  5. Its not possible, weird! I thought it was :(
     
Thread Status:
Not open for further replies.

Share This Page