[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


    Thank you :3
  3. Offline


    This is great! Thank you, and keep up the good work!!
  4. Offline


    Just uploaded a new version with Sign Clocks

    To create a sign clock, make a sign, make the first line [CLOCK], then right click to activate
  5. Offline


    I think I might use this mod just for the sign clocks!

    I'm under the assumption that it goes off of the current server's time. Is there any way to change that?
  6. Offline


    Not yet, I plan to implement basic timezone support some time this week (work permitting)
    I also want to look at implementing "game time"

    Just quickly implemented basic timezone support. Later I will implement per-sign timezone changes, but for now you can set the Time-Zone in the config file and it should get you a little closer to the time you want
  7. Offline


    Great! Not necessarily something I'll need (seeing as I'm my own server admin), but I would hate to leave out all of those people who might not be so lucky. :p

    EDIT: Game time would be fantastic. I can just imagine little clocks telling you when it's safe to come out.
  8. Offline


    Probably coming, just ran out of time this weekend.

    I'd also like people to be able to specify +/-{hrs} on their signs to change the local timezone for that sign.
    Something like this as a sign...
    ~blank line~
    (perhaps even [CLOCK +10], gives you two lines to play on)

    Might even add the option to disable server wide announcements every hour.
  9. Offline


    Could you list the timezones, just having a hard time figuring out what I need to type in to get my timezone. I am in the Eastern US
  10. Offline


    When you first load the plugin it creates the config file, in this config file on the third line at the top is a link to a list of timezones, but here is an applet that lists all the current timezones: http://mindprod.com/applet/tz.html

    If you know you're offset you can just set it to Etc/GMT[+/-][x] - for example, Brisbane is either Australia/Brisbane or Etc/GMT+10
    --- merged: Jan 31, 2011 1:21 PM ---
    Ok, is now up to using in game time and timezones for signs
  11. Can you add something like "big clocks" ?

    So we add signs to a 5x5 Area and the middle one gets the config and all signs then make 1 big clock? (idk if you can let draw BIG numbers on it)

    Btw the times only get updated if you reconnect :/ also you cant take up destroyd signs
  12. Offline


    Umm, that'll be a no - for multiple reasons.
    1. Block farming
    2. Well beyond original intent of this plugin
    3. I'm to lazy
    Try separating your signs by some distance, I've found if you have signs to close together they don't update and I have no idea why - you can see this in the youtube video

    I don't know of any reason you can't pick up destroyed signs, at least, none that would be caused by this plugin. It maintains the list of signs in a text file (that's why you have to right click to activate), when you destroy a sign it simply deletes it from the text file and tells you in a message.
  13. Can you maybe make it that i can put one sign next to another?

    Currently i need to make spaces from 7 to 12 blocks to make it work :/
  14. Offline


    I'm sorry, no, I don't even know why it isn't updating, there really is no reason I can see for it not to.

    foreach (xyz clock in text file) {
    sign = ((sign)getBlockAt(xyz).blockState())
    sign.setline(2, thetime)

    It's really not that complicated and I really can't see why it has a problem with proximity - perhaps it's bukkit? more likely it's a server limitation?
  15. Offline


    Apparently, org.bukkit.Server.getTime() has been changed to org.bukkit.World.getTime() which has broken several time-based plugins, including this.
  16. Offline


    confirm ^
  17. Offline


    Thanks for the report, I'll look at fixing it tonight when I get home. (took the night off last night ;))

    Edit: That might be tomorrow night, tonight I have to format :(
  18. Offline


    Lol, good luck man. I just came along your addon, would be great as tool and decoration lol.

    Random idea: Might set up something if a player puts 4, 6, etc signs together that some how a analog clock is shown? I could see someone making Big Ben lol.

    Just a thought. Though, the coding the analog look might be hard/tricky... :/
    Up for the challenge? lol
    (And you heard that form a Java Coding newb... lol)
  19. Offline


    I have updated to run on the latest release of craftbukkit (build 232
  20. Offline


    Verry nice! However it would be great of you could place the signs next to each other!
  21. Offline


    if I could work out why I can't I'd solve it...
  22. Offline


    have one issue with the game time, i believe its 20 mins in a 24 hour of game time right, well the clock is going though an hour in 2 seconds makeing it 48 seconds for a full day to be showned on the sign
  23. Offline


    Interesting, I admit I only spent minimal (5 mins) time testing the code change but it seemed to work for me... are you running any other plugins that tinker with time? I'll have another look tonight
  24. Offline


    only other plugin that displays the in game time is dynmap and it shows it correctly
  25. Offline


    anything the modifies the amount of day/night/set/rise?
  26. Offline


    none that i know of
    here are a list of all my plugins
    AntiBuild.jar           General.jar       Permissions.jar
    BackupPlugin.jar        iChat.jar         RedstoneChips-0.75.jar
    BasicCircuits-0.75.jar  interest.jar      SearchIds.jar
    BlockHead.jar           LoginMessage.jar  TimeAnnounce.jar
    CraftIRC.jar            MagicCarpet.jar   WorldEdit.jar
    dynmap.jar              MCDocs.jar        WorldGuard.jar
    Essentials.jar          MyWarp.jar
  27. Offline


    I'm sorry, I can't see anything in there that'd cause it, neither can I replicate it...
  28. Offline


    I'm getting the same problem as rjwboys.
  29. Offline


    When the sun is over head, does it say 12:00?
  30. Offline


    for 2 seconds, then it be 1:00 then in 2 seconds it be 2:00
    the server is at (Edited), the sign is right on the wall from spawn
    picture shows its night out and time saying 12 noon and this is a few seconds after i did /time night


    I seemed to fix it
    The default settings were
    Announce-Format=Current time is\: %s
    and i changed it to

    Announce-Format=Current time is\: %s
    and its ticking like it should be

Share This Page