Arqade is a question and answer site for passionate videogamers on all platforms. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a plugin to tell what time it is in my SMP server (time in game) without changing the time? I'm hoping for a plugin, and not a mod like Single Player Commands that I have to compile into the server .jar. My other idea is to parse the logs for the last time someone used /time and figure it out from there.

share|improve this question
What does /time add 0 do? I can't check right now but that could be what you want. – fredley Jan 30 '12 at 15:58
It prints "10:48:29 [INFO] CONSOLE: Added 0 to time". I'd still have to dig back through the logs for the last time someone set it to an absolute time. – ServerCobra Jan 30 '12 at 16:47
up vote 5 down vote accepted

Figured it out. The data is in the level.dat file. Assuming you're using Python, here's a code snippet that should get the current time (run "sudo pip install nbt" first):

import nbt
def get_time():
    n = nbt.NBTFile('%s/%s/level.dat' % (minecraft_dir, session_name))
    if n == None:
        return None
        return n[0]["Time"].value % 24000

For bonus points, you can change the modulo to a division sign and get how many days it has been since you started.

share|improve this answer

Your Answer


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.