Inactive [FIX/MECH] properTime v2.0 - Control the speed of time [1.0.1-R1]

Discussion in 'Inactive/Unsupported Plugins' started by andersonhc, Aug 9, 2011.

  1. Offline


    properTime - Control the speed of time, for example to fix too long days/nights due to lag:
    Version: 2.0

    BukkitDev Project Page:

    On many servers, lag causes the time to pass extremely slow, so xupwup created a fix.
    properTime runs in a dedicated thread, so it wont really be affected by lag.
    By default this plugin makes sure that the day/night cycle lasts exactly 20 minutes.
    If desired you can change this, so that it always runs at half speed, or -10 times as fast, causing the time to go backwards really fast :). Please note that this will cause the sun/moon to jerk, this can only be fixed with a client mod.
    This plugin is also compatible with other time changing plugins, however, I advise against using it in combination with time stopping plugins. It also works fine with beds.

    Sample config file:
        timespeedday: 0.5
        timespeednight: 1.0
        timespeeddusk: 1.0
        timespeeddawn: 1.0
        perma: none
        preset: alwaysnight
        followworld: world
        followworlddelay: 6000
    Valid values for perma are: none, night, day or numeric values between 0 and 24000.

    Valid presets are:
    ALWAYSDAY: permanent midday
    ALWAYSNIGHT: permanent midnight
    CYCLE24M: a full day/night cycle lasts 24 minutes, instead of 20min.
    CYCLE24H: a full day/night cycle lasts 24 hours

    Normally day lasts 10 minutes, dawn + dusk 1.5, and night 7.
    If you want your day to last 12 minutes, you should set timespeedDay to 10/12 = 0.833
    Also, when freezing time, if you set the time to somewhere during dusk or dawn, the light will flicker for the client. I advise against this.

    • Configurable time speeds
    • Dedicated thread (so lag proof)
    • Separate configuration for day, night, dawn, dusk
    • Multiworld support (the plugin that creates the secondary worlds needs to load before properTime)
    • Permanent day/night
    • Ability to freeze time.
    • Keep time between different worlds sync'ed, with optional delay.
    To make sure that properTime loads after your multiworld plugin: (thanks to @tehbeard)

    Open properTime.jar with a program like winrar, and edit the plugin.yml file inside. Add the following code to it:
    softdepend: [MultiVerse]
    In this example properTime will load after MultiVerse. Do this for any multiworld plugin you use. (note: you need the name of the multi world plugin as stated in it's own plugin.yml)


    First of all, carefully read all errors, as well as the last few comments on this thread. If that does not fix your problem, try adding "debug" to the top of your config file. That way the plugin will give you a lot of information, some of which may be useful for finding out what is wrong.

    World "foo" not found
    Make sure your plugins load in the correct order. You can also try to remove or rename your config file, so that it is regenerated with the correct worldnames and syntax.

    Download on BukkitDev Project Page:


    Version 1.9.0
    • Added presets. Presets included are: ALWAYSDAY, ALWAYSNIGHT, CYCLE24H, CYCLE24M.
    • perma values may also be: none, day, night.
    • Added possibility to change default settings.
    Version 1.8.9

    • Sources are now inside the jar file. No other changes.
    Full Changelog:

    Show Spoiler

    Version 1.8.8
    • Open sourced!
    • Different synchronisation with the main thread, this should fix concurrentModificationException errors.
    Version 1.8.7

    • Use the bukkit scheduler to set the time from a thread. (should fix concurrentModificationException errors)
    Version 1.8.6

    • Added debugging functionality that can be enabled by putting the word "debug" somewhere in your config file, preferably at the top.
    Version 1.8.5

    • The parser now supports world names with spaces.
    • (A bit) nicer error messages.
    Version 1.8.4

    • Fixed stupid mistake where it said 2400 instead of 24000, causing a lot of weirdness when using the perma option.
    Version 1.8.3

    • Fixed a bug in the parser that caused nullpointer exceptions for some files.
    • Added the "perma" option for configuring permanent day/night.
    Version 1.8.2

    • Fixed bug that caused values below 1 to get rounded to 0, causing the time to stop for those that use a timespeed less than 1.
    Version 1.8.1

    • Fixed nullpointerexception when stopping the server when an invalid config file has been used.
    Version 1.8

    • Added multiworld support
    Version 1.7

    • Fixed compatibility with newer bukkit versions
    • The config file is now located at: plugins/properTime/properTime.conf
    Version 1.6

    • If the client would jump to for example dusk, the server will use the timespeed for dusk, so if you set your day speed to 0.25, and the dusk speed to 1, this will fix the flicker during the few seconds when the client wants to go to dusk, and the server still says day. This should not change anything if you use timespeeds >= 1.
    Version 1.5.1

    • Fixed namespace, see this.
    Version 1.5

    • Fixed compatibility with newer bukkit versions
    • You can now configure what world this plugin should work on. (only one is supported and this is not in the default config file)
    Version 1.4

    • Added the ability to configure timespeeds for dusk/dawn.
    Version 1.3

    • Fix compatibility with newer bukkit versions.
    Version 1.2

    • Added the ability to configure timespeeds for day/night independently.
    Version 1.1

    • Renamed properties file + location
    Version 1.0

    • Initial release
  2. Offline


    Does it modify the redstone and water flow time too? Because the last plugin I tried was bugged because of this. I presume that this one is working!! I'll give it a try as soon as I can! Thanks! =)
  3. Offline


    Thank you for taking over this plugin! +1 to you :)
  4. Offline


    Does there happen to be a client mod out there already that fixes this? I would be more than willing to install this into my client to get rid of that awful jerking.
  5. Offline


    This plugin doesn't affect redstone or water flow time.

    I hope you enjoy it!

    No, there's no client mod yet.

    What we can do is recommend using only the speed 1 in "timespeedDusk" and "timespeedDawn".

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  6. Offline


    working on 1046+ :)
  7. Offline


    thanks andrewkm.

    Updated the thread for bukkit 1060, and added information on OP about the use of presets.
  8. Offline


    so if i take CYCLE24H it takes 12 hours to make it night from 0.00 and 12 hours to make it day from 12.00??
  9. Offline



    word: "worldname"
    preset: CYCLE24H
  10. Offline


    Does what I need, thank you.
  11. When i try and edit the plugin.yml, to make it load before multiverse, i uncomment the #, it says "cannot create __rzi_47.432" Can you explain what i have done wrong
  12. Offline


    Maybe it's a 'write permission' issue.

    Try downloading the plugin from
    In this version the line is already uncommented.
  13. Their exactly the same :/ The # is still there. It isn't uncommented?

    Edit: Does this work in a skylands environment generated by multiverse?
  14. Offline


  15. Hmm, it is still not working for me :/, can you check this for me?
    world: "Oddity"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: none
    world: "Skyland"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: none
    What have i done wrong, i have just dragged and drop the .jar as usual and edited the config file, the console shows no errors, and it does load after multiverse... What do you think?

    Edit: just in case this is necessary i have tried it with the break in-between like this
    world: "Oddity"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: none
    world: "Skyland"
    timespeedDay: 1.0
    timespeedNight: 1.0
    timespeedDusk: 1.0
    timespeedDawn: 1.0
    perma: none
  16. Offline


    I didn't get... What is not working?

    Did you try erasing your config file and start bukkit? (The plugin will create a new config file, and then you edit this new file.)
  17. Offline


    You have set your config file to default, so propertime does nothing (except prevent lagging time). Try setting timespeedDay to 20 or something to check if it works.
  18. Time in the normal world works, however the time in the skylands doesen't, in 'Oddity' the time is fine, 20 mins cycle, whereas in the skylands the sun just stays at noon all the time...
  19. Offline


    Try using debug, and see what properTime thinks it is doing. Add
    to the top of your config file.
  20. Code:
    25.08 15:16:46 [Server] INFO properTime 1.9.0 initialized
    25.08 15:16:46 [Server] INFO properTime reading from config at /home/minecraft/multicraft/servers/OdditySMP_25565/plugins/properTime/properTime.conf
    Thats what it showed when i Debugged... Sorry about all this trouble guys :/
  21. Offline


    Unless @andersonhc changed the debugging code, it should output a lot more than that. Remember to put "debug" at the top of your config file, on its own line.
  22. Ok thanks about that, sorry XD
    26.08 00:35:33 [Server] INFO time is now fixed to -1
    26.08 00:35:33 [Server] INFO World Skyland timespeedDawn is now 1.0
    26.08 00:35:33 [Server] INFO World Skyland timespeedDusk is now 1.0
    26.08 00:35:33 [Server] INFO World Skyland timespeedNight is now 1.0
    26.08 00:35:33 [Server] INFO World Skyland timespeedDay is now 1.0
    26.08 00:35:33 [Server] INFO World set to: Skyland.
    26.08 00:35:33 [Server] INFO time is now fixed to -1
    26.08 00:35:33 [Server] INFO World Oddity timespeedDawn is now 1.0
    26.08 00:35:33 [Server] INFO World Oddity timespeedDusk is now 1.0
    26.08 00:35:33 [Server] INFO World Oddity timespeedNight is now 1.0
    26.08 00:35:33 [Server] INFO World Oddity timespeedDay is now 1.0
    26.08 00:35:33 [Server] INFO World set to: Oddity.
    26.08 00:35:33 [Server] INFO properTime debugging enabled
    26.08 00:35:33 [Server] INFO properTime reading from config at /home/minecraft/multicraft/servers/OdditySMP_25565/plugins/properTime/properTime.conf
    It says that, then it spams this...
    26.08 00:35:48 [Server] INFO Synchronized time on world "Oddity", diff was 0.
    26.08 00:35:48 [Server] INFO Synchronized time on world "Skyland", diff was 0.
    Is there anything wrong there :/ ?
    Thanks alot for your help, i appreciate it!
  23. Offline


    Based on the log's informations, the time is flowing ok in both maps.
    I'll take a closer look at this SKYLAND environment, but apparently it's always sunny in all Skylands.
  24. Offline


    This means that all timespeeds are set to 1. The diff messages show that your server is already running at the same speed as propertime synchronises to. (diff is the difference between what propertime wants and what it is at the time of synchronisation)
    To me it appears that it just works.
    What I do find strange, is that the order of your debug messages is wrong, it should say "world set to" before any other status messages regarding that world. However, your messages do show that the difference was 0, so propertime's syncing is not actually changing anything. If I am not mistaken, the always noon problem would still exist without propertime.

    By the way, andersonhc, you made the code a bit of a mess, so I am leaving the rest of the bug fixing to you. So, maybe an interesting test would be to try with the original propertime, and see if that one also has the always noon problem with your world.
  25. I know, but i want it to cycle normally :),
    Im gonna try this now!

    Edit: I tried the original Propertime, once again didnt work :/, Its probably me guys, or the Skylands, Sorry for all this hassle, I will try to use the old one later... Thanks!
  26. Offline


    Seems like something else then, because the original properTime was bug free I believe. Unless a newer bukkit version broke things of course. Anyway, it's probably another plugin stopping time on that world.
  27. I see, sorry about all the questions, you guys are awesome by answering and have helped me alot. Have you got any ideas of what i can do.. :/

    Edit: What i mean is, Got any other suggestions for plugins that do this :/?
  28. Offline


    It's definitely not a properTime bug, the plugin is working fine.

    In Skylands it's always day, that's how it is supposed to work. The time is not stopped, it flows, but the sun is always there.
    If a plugin can chance the environment behavior, it's Multiverse.

    There are some discussions on this forum trying to find a way to change this, like on

    He is showing a log file in "time descendant" order (most recent first).
    So, the first line writen was "reading from", the secound was "debugging enabled" and so on. The "World set" is still being showed before setting properties.

    Ouch... it's not that different.. :oops:
    On version 1.9.1 most of changes will be on "readability", specially the config file parsing.
    Maybe an option to set properTime off in any specific world, so a thread would not be launched...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 18, 2016
  29. ahh thanks alot :D, here have some [diamond][diamond][diamond].
  30. Offline


    The properTime thread is nearly free performance wise, so save yourself some time and don't implement that feature.

    About the readability. (Note that this is helpful advice, not me hating or something.)
    • lCurrentWorld why does that variable exist? Because it is equivalent to "World " + c.w.getName(). And what does the l stand for?
    • isValidWorld() and isValidOrigin() should be merged. (they are always used together, and always with an && in between, so it should be 1 function)
    • lValidWorld is equivalent to c != null (declared at line 100) I believe, so if I am correct it should be removed.
    • applyPreset() is used only once, so it should be inlined.
    • isValidWorld(c, lValidWorld) & isValidOrigin(c) You are using a bitwise and here, where you are supposed to use a normal and, like this: &&. The same problem in the functions isValidWorld() and isValidOrigin().

Share This Page