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

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

  1. Offline

    cisco211

    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.

    Features
    • 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
    Important

    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!

    Commands

    Code:
    Help
    ====
    - 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)
    Code:
    enable: false
    debug: false
    worlds:
      world:
        enable: false
        freezeTime: 'off'
        rememberInterval: 0
        updateInterval: 60
      world_nether:
        enable: false
        freezeTime: 'off'
        rememberInterval: 0
        updateInterval: 60
      world_the_end:
        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).
    Permissions

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

    Download

    JAR:
    SRC: Source Code has been included in jar file.

    Screenshots

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

    Changelog

    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
    Todo

    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

    todritter

    I agree with Luan5006, it would be awesome if you could fix this. It makes the server admin (me) look bad when you have to tell your guests, "the moon is just gonna keep going apesh*t until the mod author fixes it, sorry"

    However, I do have to give kudos to cisco211, TimeSync is definitely more reliable than RealTime.

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

    cisco211

    This cannot be fixed on server side, your client is moving the moon, not the server :p
     
  4. Offline

    todritter

    Ahh, okay I get it now.
     
  5. Offline

    DeCrow

    Maybe I'm wrong, but you seem to mess with the time zones. The physical server have local time with already added time zone hours. Your plugin adds 2 extra hours, as mentioned above. For convenience, I ask you to add a time zone settings to config file, please.
    For example:
    /ts rt
    Answer: ...is now 21:30
    /ts t
    Answer: ...is now 21:30
    /time
    Answer: 23:30
     

Share This Page