[MECH/ADMIN] TimeSync v0.6 - Sync time with real time [1597]

Discussion in 'Inactive/Unsupported Plugins' started by cisco211, Jul 17, 2011.

  1. Offline


    TimeSync - Keep the game time in sync with real time

    Note: This plugin isn't inactive or unsupported, it still works perfectly on current build (1.3.1-R2.0).

    Version: v0.6

    Keeps the internal game time in sync with real time or freezes the time through an given value.

    • Keeps game time in sync with real time (the local server time)
    • Uses the converter functions (code2time and time2code) from lib24time
    • Ability to freeze the game time to a given value (HH:MM value)
    • Converts the game time to real time
    • Ability to show the current time formatted in HH:MM
    • Ability to automatically repeat the current time in chat for a given interval
    • Panic command to unload the plugin
    • Plugin can be enabled/disabled without unloading it for all worlds or just for specified worlds
    • Plugin can be reloaded (to refresh configuration, permissions and world's)
    • All configuration values can be set ingame or in console
    • Debugging feature (shows updated time in console and chat)
    • Compatible with permissions plugin (This plugin does not exist anymore!)
    • Generates the config file automatically

    If you are updating from v0.4 to v0.5 or earlier, then you have to delete your config.yml, because the "old" format is no longer supported!


    - Syntax: /<cmd> <option> [value]
    - WorldSyntax: /<cmd> <world> <option2> [value]
    - <cmd>: timesync or ts
    + <option>:
      - help|h|? - Shows this help
      - about|a|version|v - shows plugin info
      - alltime|at - shows time of all worlds
      - time|t - shows time of current world
      - realtime|rt - shows the real time
      - debug|d - enable/disable debugging
      - enable|e - enable/disable plugin
      - panic|p - unloads the plugin
      - reload|r - reloads the plugin
    + <option2>:
      - enable|e - enable/disable for world
      - freeze|f - freeze to the given time
      - interval|i - sets update interval
      - remember|rm - sets remember interval
    config.yml (with default settings)
    enable: false
    debug: false
        enable: false
        freezeTime: 'off'
        rememberInterval: 0
        updateInterval: 60
        enable: false
        freezeTime: 'off'
        rememberInterval: 0
        updateInterval: 60
        enable: false
        freezeTime: 'off'
        rememberInterval: 0
        updateInterval: 60
    • enable = enable/disable the plugin.
    • debug = enable/disable debugging.
    • worlds.<worldname>.enable = enable/disable plugin for <worldname>.
    • worlds.<worldname>.freezeTime = freeze world time to HH:MM or turn "off" this feature.
    • worlds.<worldname>.rememberInterval = Interval when the current time should be displayed in chat (72000 = 1 hour).
    • worlds.<worldname>.updateInterval = Update interval for time syncronization (20 means 1 second).

    OP (ops.txt) is used.
    The craftbukkit permissions system is currently not supported!


    SRC: Source Code has been included in jar file.


    No screenshots available (its not possible to show the features with screenshots :p).


    Version 0.6 [1597]
    • Fixed formatting and conversion errors through using the converter functions from lib24time
    • Refactored TimeConverter class
    • Refactored tests
    Version 0.5[1597]
    • Restructured commands
    • Restructured the configuration
    • Removed "raw" commands
    • Added multiworld support
    • Removed command tests
    • Heavy refactoring (All has been reorganized)
    • Fixed ConcurrentModificationException (just catched that exception and changed async task to sync task)
    • Added the ability to use TimeSync in console
    • The helptext is now stored inside the jar as textfile
    Older versions... (open)

    Version 0.4 [1597]
    • Improved code for world/player names (.getName() is finally there)
    • Fixed a small bug in panic switch, where the repeater threads did not stop
    • Changes in TimeSync configuration are now shown in all channels
    • Updated/Fixed help text
    • Added time message which will be broadcast by a given interval
    • Changed the deprecated Configuration API to the new Configuration API
    • Removed permissions support (That was a plugin called "Permissions" which does not exist anymore)
    Version 0.3[953-1000]
    • Heavy refactoring (All has been reorganized)
    • Almost all commands are now executable without being or simulating a player
    • Improved the the test system to allow deeper and better tests
    • Fixed the bug where rawfreeze command throws an exception when set to 'off'
    • The config file will now be generated with comments
    • Improved the updateInterval, to allow finest setting
    Version 0.2[953-1000]
    • Fixed a bug where the minute 0-9 did not had a leading zero.
    • Added selftest method to verify that the time conversion is working correctly
    • Added detection for new permissions system (still compatible to [953])
    Version 0.1[953]
    • Just created the plugin

    Known Issues
    Unfixable Issues are not listed here.
    • None

    Ideas are welcome.
    • Absolute remember interval instead relativistic
    • Spout support to avoid the "sky jump" effect in client
    • Add ability to use the new permissions system.
    • Multilingual support
    • Multiworld support
    • time and rawTime command should show the current ingame time instead the local server time
    • A configurable and repeating text-message for the current time
    • Adding comments when generating config.yml
    • Better updateInterval.
    HappyPikachu and CrazyiPodFreak like this.
  2. Offline


    Seems interesting i'll give it a go have to wait for download link tho
  3. Offline


    please update your plugin to the latest RB(#1000) , it just came out today.
  4. Offline


    I updated it, and its still compatible to 953 :)
  5. Offline


    would be testing it out if my client minecraft would let me login second time it has happened in 2 weeks =/
  6. There's an issue when setting the interval to less than 30 tics (/ts interval 1) where it affects the timing and delays of redstone circuits and buttons. I'm running the latest recommended build of Bukkit running TimeSync, CommandBook, and WorldEdit.
  7. Offline

    Zion Fox


    • The help string for /ts interval [seconds] should be changed to [miliseconds]
    • The help string for /ts freeze [no:'hh:mm'] should be changed to [off:'hh:mm']
    • The reults of /ts time and /ts rawtime in parenthasis are not correct. (I'm assuming it's supposed to be 12 hour and (24 hour), but at 6:57am it is not (22:57), it is actually (18:57), but that's not right either, because it's not 6:57pm).

    There is also a current issue where once the time has been frozen, it cannot be unfrozen. I've tried manually changing the config to relate, and also reloading the plugin, all plugins, and restarting the server to no avail.
  8. Offline


    Could you give a link to the team at CraftBukkitUpToDate please?

    EDIT: Also, Excellent Plugin!
  9. Offline


    Yes, thats correct but not fixable, because an interval of less than 30 ticks is lesser than a second. Im not really sure but it seems that the redstone things are using the time float value to create the delays. I also dont recomment to use lesser than 30 ticks in an online server, because it (can) create much network traffic, because each interval fires the time update to all clients.

    I will change [seconds] to [ticks] soon, because the interval is not in seconds anymore (30 ticks = around 1 second). "time" and "rawtime" does not mean 12hrs and 24hrs. "time" means your local server time and "rawtime" means the internal float value before conversion to the local server time.

    I made it:
  10. The only reason I was setting the interval to less than 30 seconds is to avoid the jerky motion of the sky. I understand that this is a limitation of the client, since it's hard coded to 'estimate' the server time and move the sun accordingly.

    Would it be possible to use Spout to set the correct time speed for clients, or has that not yet been implemented into the spout API?
  11. Offline


    so what i must do that the time is synchron with the real time?
    sorry im really nooby with some plugins :(
  12. Offline


    /ts e 1
  13. Offline


    thank you, but when my real time is 7:0o its ingame 9:00. Can i debug this, and how?
  14. Offline


    the ingame time syncs to the time where the server runs. check the time of your server.

    PS: Seems that you didnt read the first post, everything you have asked has been answered in the first post. rtfm!!!
  15. Offline


    Great plugin but i really wanted to make only one world real-time sync so could you add miltiworld support as soon as possible please, thanx

  16. Offline


    Can you Update it to #1337 - and add Multiworld Support? :>
  17. Offline


    Yeah, i will update it when i got the time :D
  18. Offline


    THANK YOU :D:D <3
  19. Offline


    Please note, that Multiworld support is still not available, because i have to do huge changes in that plugin (seperation for each world in config.yml).

    Atm the settings of this plugin should apply to all loaded worlds (excepts for nether and the_end).

    Adding multiworld support is the next plan for this plugin.
  20. Offline


    Multiworld support added :D
  21. Offline


    Command book does interferes with this plug-in, incompatible for me.
  22. Offline


    Not very helpful, what exactly is the problem? I tested commandbook and i cant find any problems with it. If you want to change the current world time, you have to do it in timesync, because TimeSync's repeater task will overwrite the changes you have made from elsewhere.
  23. Offline


    This is a great plugin. Thank you for developing it.

    I notice however that I have to disable then enable the plugin every time when starting up the server otherwise the plugin appears to be operating in an offset (time still flowing in real world delay but wrong time of day).

    Suggestion: incorporate sunrise/sunset calculation for time of year. I suspect this would cause a fundamental rewrite of how the plugin operates as it would have to measure time delay differently for each part of the day.

    Sites such as this have rss data for sunrise sunset. http://developer.yahoo.com/weather/

    A config for location which would be sent to the site could accomplish the task, and the plugin would not need to get this info very often.

    I'm a pixel artist so I'd gladly pay in pixels, or access to my texture pack dev versions (in development again) to see you develop this more. :)
  24. Offline


    I fixed it by re-enabling it, but now my time is two hours ahead of my time zone.
  25. Offline


    The time is based on the time of the machine where you run the minecraft server.
  26. Offline


    I doubt it's the plugin that would have to be rewritten, it would be how minecraft does the sunrise and sunset functions. I think for him to do this he'd have to rewrite where the sun / moon are in the minecraft world. The problem with doing proper sunrise / sunset in minecraft is that minecraft's world is truely flat where ours is round. If you live near the equator your sunrise and sunset would be reletively close to what you have in minecraft, however in north america or europe, the sunrise and sunset is based on the earth's tilt toward the sun, IE longer in the summer because we're tilted toward the sun and shorter in the winter due to the fact that we're tilted away from the sun and the "air time" the sun has is less because it's position is not directly overhead and there's less physical sky for the visible sun to travel through. You'd experience an even more significant sunrise / sunset effect in alaska or the north pole where in the winter, there is next to no daylight at all, and in the summer, there's next to no night. I believe during some times of the year you don't really have a daytime, you just have a 2 hour dusk/dawn and then it's back to night for the other 22 hours, similarly you'll find that in the summer, the sun gets really close to setting and may dip below the horizon for a few hours but there's nearly 24/7 daylight.

    Bottom line: Minecraft probably won't be able to do this because the world is flat...but hey more props to the programmer if he can get it to work...

    Actually i just had a thought...cisco, you could make the time ticks faster in the winter during the "daytime" and the gradually slow them down during the "night time" and not base it off the actual system clock to make the effect of longer and shorter days and nights for the seasons. Then just report the actual server time as the in-game time. Might be pretty complicated but it's probably doable if you can figure out the calculation of reletive daylight vs nightlight during the various times of the year. I sense much math in your future if you truely do this lol.

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


    Thats really possible but i see more the problems with client. If i would let the time go slower or faster you would see a flickering sky. I made the update interval configurable, this means you can control how much the sky is flickering. But if you set the update interval below one second (20 ticks) then the redstone repeater are not working correctly. Atm im looking how to combine this plugin with spout to have a much better look and feel on the client side.
  28. Offline


    Great plugin, works like a charm. I'm tempted to test this with StreetLamps~
  29. Offline


    Is there a way to fix the problem with the moon phases?
    Everytime it's night, the moon goes bananas because the time keeps resetting itself and it starts to look like a siren.
  30. Offline


    This is not fixable on server side.

Share This Page