Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

I'd like to know exactly when the <playername>.dat files are saved on the server. (I'd like to run a script that tracks the players' locations and inventories, and this is crucial to whether this script will work or not.)

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I decompiled the Minecraft server version 1.2.5 using the Minecraft Coder Pack and quickly stumbled through the code: The players inventory and location gets saved into the <playername>.dat when:

  • The server stops
  • The player disconnects

So one possible way to go if you wanted to keep track of your players locations and inventories would be to use an event-based plugin wrapper such as Bukkit and write a plugin which does whatever you want with the players information as soon as he disconnects (or at any other time).

If you cannot or do not want to use Bukkit, you could possibly try to monitor file updates with a third-party software.

share|improve this answer
    
The script runs every few minutes and it logs the data from the .dat files... The whole idea is to see what the player is doing while they are online, so I'd need something that makes the server update the files regularly... Thanks for the input. –  Yoshiyahu May 18 '12 at 22:18
    
You're welcome. The server by itself will not update the files more reqularly, your only way here would be using some sort of modification to the server, either using a wrapper such as Bukkit, or to change the source-code yourself. –  Pit May 18 '12 at 22:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.