[INACTIVE][INFO] TimeAnnounce v1.5 - Hourly time announcements, ClockSigns [1000]

Discussion in 'Inactive/Unsupported Plugins' started by freman, Jan 29, 2011.

  1. Offline


    TimeAnnounce - Hourly time announcements:
    Version: v1.5

    Players on my server found that we were easily losing track of time so I created this simple plugin (it's actually based apon a plugin requiest I made for hMod - I've ported it and given it more features) to tell us the time every hour

    • Signs close to each other now all update
    • Tells the time when configured to
    • A player can check the time with /thetime
    • Sign Clocks! Just make a sign with [CLOCK] on the first line and right click the sign
    • Sign clocks can display time in a different timezone, or even "game time"
    • Supports custom time formats and message formats
    • Basic timezone support - time displayed can be different from that on the actual server
    • Sign clocks work on any and all worlds


    • Split the "game" and "real world" clocks into different task schedulers
    • Player alarms?
    • Permissions support?
    Download TimeAnnounce (Version 1.5 for RB 1000)

    How to use:
    1. Create a sign, it can be a sign post - or a wall sign
    2. Set the first line to [CLOCK]
    3. (optional) Set the last line to GAME or [GMT+10:00] (+ can be a -, 10:00 can be any zone)
    4. With any tool, right click on the clock *
    * optional now, if the server admin has configured Right-Click-Enable=false then the sign will activate by it's self

    • Update-Rate=250 - The number of milliseconds between each clock update (if you're not using game clocks feel free to increment to 1000 (range: 50 - 1000)
    • Game-Clock-Resolution=5 - The number of minutes to tick at a time on game clocks, lower resolutions might require you to make Update-Rate lower (1-15 - at 10+ you can set Update-Rate to 1000)
    • Date-Format=HH\:mm - The format used to display the time in the server broadcast
    • Sign-Date-Format=HH\:mm - The format used to display the time on signs
    • Announce-Format=Current time is\: %s - The format of the broadcast message %s becomes the time - Colors should work.
    • Right-Click-Enable=true/false - if true then signs will require right clicking to activate (the old way) if false then signs will activate automatically
    • Announce-At=00,05,10 - the minutes of the hour to announce at (must be 2 numbers)
    • Log-To-Console=true - set to false and you wont' have any time announcements in console
    Version 1.5
    • Significant code refactor (not a complete re-write... not yet)
    • Configure most sign parameters (formatting, timezone) on boot instead of reading and parsing each sign at every clock tick (should make things smoother no? :))
    • Split the clock scheduler away from the announce scheduler
    • Schedule all sign updates to correspond with server ticks (it takes 200 ticks to update 100 signs but shouldn't cause any lag)
    • The above scheduling change means you can put signs right next to each other!
    • Yes 1.3 & 1.4 are missing, they never existed this was such a big change in the code base it warranted a half version update
    Version 1.2
    • Added option Log-To-Console
    Show Spoiler

    Version 1.1
    • Updated to latest craftbukkit - it wont work for previous builds
    Version 1.0
    • Updated to latest craftbukkit - it'll probably work for the previous few builds
    • Added the option to auto-enable signs
    • Added option for setting which minutes to announce at
    Version 0.9
    • Updated to build 405 - it will probably work on older builds but I won't make any promises.
    Version 0.8
    • Fixed issue breaking announcements after the first hour
    Version 0.7
    • Updated for build 304 of bukkit (will probably work in older versions still but I wouldn't take it back before say 250)
    • Fixed the math (or rather operator precedence) used to calculate times at lower resolutions (made time fly at a resolution of 5)
    • Cleaned up the onBlockPlace prevention code - was causing issues where you couldn't place blocks for several clicks after the sign was activated.

    Alcohol makes coding in Java more fun, Caffeine makes it possible to do after a day of coding in other languages at work - both of these habits are expensive - Want to help me feed my addictions and make more, better plugins faster? Consider hitting the button below.
  2. Offline


    The time announce still worked up to 766, then I cut this plugin out to use the time announce in rTriggers to cut down the number of pluggins I'm running. Sorry. I really liked this plugin.
  3. Offline


    Quick question:
    Has the sign proximity failure been fixed?
    I'd like to have multiple signs that show game time in close proximity, and the last time I tried it, it failed..
  4. Offline


    Doubt it, it's an issue in bukkit or mc it's self - I know of a work around but implementing it is a hell of a task (partially because of how the plugin was originally written)
  5. Offline


    Explain a tiny bit? I have faith that I could do it, but I'm questioning as to whether or not it's worth the time..
  6. Offline


    As far as I understand it the work around involves batching sign updates to run one after each other on a schedule of one per tick, as it is the sign updates are already done outside of the main thread...

    Signs are already managed as a vector, in an object so I could probably upgrade that to an iterator and schedule it instead of running it in the timeannounce thread...

    Signs were never really the primary drive of this plugin, it was the broadcast announcement that we so desperately wanted and every other feature since has been hacked into that thread.

    I suppose I can have a go at re-writing it now that I know more, perhaps even releasing the source (it's embarrassing in the current state)
  7. Offline


    Funny, I really only make use of the sign feature..
    I couldn't do anything with the code. I'm no code writer. Though, if someone else picked it up, and re-wrote it with signs as the focus, I feel that that'd be pretty helpful..
  8. Offline


    @ freman
    i also used this but it caused lag with 5 sec interverals back in 780, and can u get teh signs close to each outher yeat? theres aslot machine plugin that was able to do this maky u could look it that code
  9. Offline


    Is the Time Zone page down?
    Which timezone i have to use 4 germany?
  10. Offline


  11. Offline


    Thank you very much
  12. Offline


    I'm off to the Gold Coast for the next 10 days but once I get back I'll have a look at re-writing this plugin.
  13. Offline


    works for me (1.6.6 bukkit 818)
  14. Offline


    I have a request: could you add a single OP only command as you re-write it, to reload the config so you won't have to restart the whole server?
  15. Offline


    Hey freman, do you plan on adding more features? I and the people who play on my server love your plugin because we can make clock signs, but that and time announcements are it.. Is there a chance of you adding more functionality somehow? I would love to be able to make a giant click out of, say white and black wool for a town square or something. Will you ever add something like that?
  16. Offline


    Could allow colour codes for the announce format.

    For example:
    Great plugin! Many thanks!
  17. Offline


    Sorry, no updates yet - family brought some exotic version of the flu up when they visited - I've spent the past week in bed.

    Colour codes should be available as §7%s but you might need to wrap it in quotes...
  18. Offline


    Just downloaded this plugin and it works great, sign clocks are a brilliant idea and are why I downloaded the plugin. I am having a problem with them however, some sign clocks appear frozen at a specific time often with other signs nearby. I'm using bukkit 953.
  19. Offline


    13:07:55 [SEVERE] java.lang.NullPointerException
    13:07:55 [SEVERE] at org.bukkit.craftbukkit.block.CraftSign.getLine(CraftSign.java:24)
    13:07:55 [SEVERE] at au.net.fremnet.bukkit.TimeAnnounce.ClockSigns.update(ClockSigns.java:152)
    13:07:55 [SEVERE] at au.net.fremnet.bukkit.TimeAnnounce.TimeAnnounceTask.run(TimeAnnounceTask.java:37)
    13:07:55 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512)
    13:07:55 [SEVERE] at java.util.TimerThread.run(Timer.java:462)

    THERES A BUG!!!!!
  20. Offline


    Greetings one and all

    I would like to announce TimeAnnounce 1.5 - A huge code refactor over 1.2 (hence the skipping of versions)
    Improvements (non-coder version):
    • I've separated the process that announces the time and the process that updates the clocks - this means less work on one thread - meaning less lag.
    • Read the timezone/game preference from the clock at server start/sign placement instead of each time I try to update the sign - this means less work in one thread - meaning less lag.
    • I've separated and scheduled each sign update individually with the server - this means less work being done in a given tick, and, you can now place signs right next to each other
    • You can now place signs right next to each other.
    Have at it, find the bugs - I'm sure there are some :D
  21. Offline


    plugin works perfectly question is how do you set it to 12 hour format for sydney?
  22. Offline


    Hi from QLD, I'll tell you tomorrow when I sober up
  23. ok got it work, proplem: changed my game time to 10.00 AM , it shows in sign 8:00 am.. wtf? :D
  24. Offline


    Date-Format: h\:mm a

    How are you setting game time to 10 am?
    The plugin works on midday being sun directly over head
  25. Offline


    Found a small glitch, if you remove the sign by breaking the block behind it, replace the block then replace the sign dont write anything.. then the clock shows the time only, it dosent say [CLOCK] =) dont remove this glitch i think you should tell everyone that you can do it because it makes the signs look nicer

  26. Offline


    the glitch there is the fact that if someone breaks your sign by removing the block behind it and doesn't replace it then the server is spending time updating a non-existing sign
  27. Offline


    i like it better like that anyways.. dosent make it look sloppy.. no offence
  28. i use /time world 10 <-- turns into 10 AM
  29. Offline


    ok 12 hour format is good one last question give the clocks colour like red blue green #4 #2 for example
  30. Offline


    It has to be fixed because someone malicious could place hundreds of signs and break them leaving a background thread trying to push updates into the minecraft main thread making it lag.

    Maybe that plugin assumes 1000 is 10 am - it's all worked on when the sun is directly overhead - try setting your time to 12 and see where the sun is and what time is on the sign.

    You can use the § character (be sure to save the config in utf8) - so §4 and §2
  31. Offline


    so no permissions? anyone can /thetime or make a clock sign?

Share This Page