[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


    dont know if u read this, sorry for reposting...
  3. Offline


    hehe, no, I saw it - I was hoping you'd forget about it (it's actually written in a very very lazy manner ;))

    I'll look at doing that while I'm tinkering with sign update work arounds...
    --- merged: Feb 21, 2011 9:44 AM ---
    Updated to latest build
    --- merged: Feb 21, 2011 9:44 AM ---
    (Meaning I've made no other changes - too damn tired and not drunk enough)
  4. Offline


    ok i'll hope and wait;)
  5. Offline


    i was told to have you fix your stupidly long constructor

    my bukkit console told me :/
  6. Offline


    thats cuz with the new server version out, alot of plugins need to redo there listening commands and such.
  7. Offline


    No that was because bukkit changed 3 or 4 days ago - I updated this plugin since then - simply re-download and update your installed version and the warning message will go away

    In future it might be an idea to take note of when the last "updated" post is compared to when you downloaded it - or - the version number of the plugin on this page vs the version of the plugin when you downloaded before making such posts as the problem you're posting about is possibly fixed.
  8. Offline

    Lee Hayward

    In your screenshot there's a nice little map, what plugin are using for that? ;)
  9. Offline


    see my sig
  10. Offline


    CB 447, TimeAnnounce 0.9:

    03:03:17 [SEVERE] Exception in thread "Timer-1"
    03:03:17 [SEVERE] java.lang.ClassCastException: org.bukkit.craftbukkit.block.CraftBlockState cannot be cast to org.bukkit.block.Sign
    03:03:17 [SEVERE] at au.net.fremnet.bukkit.TimeAnnounce.ClockSigns.update(ClockSigns.java:117)
    03:03:17 [SEVERE] at au.net.fremnet.bukkit.TimeAnnounce.TimeAnnounceTask.run(TimeAnnounceTask.java:18)
    03:03:17 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:534)
    03:03:17 [SEVERE] at java.util.TimerThread.run(Timer.java:484)
  11. Offline


    Yep, I know - I'll look at it some time tonight or tomorrow.
  12. Offline


    For the record, Version 0.9 works great on build 450!
    Edit: I lied. It doesn't remove clock placement. :(
    Edit 2: I get the same error quoted above.
  13. Offline


    Yep I know, I tested friday night I was just too damn tired to do something about it
  14. Offline


    We need update! [​IMG]
  15. Offline


    I'm glad you're aware, though. Thank you for acknowledging the error and fixing it. :) I love your plugin because it keeps me and my members safe when we're deep underground mining and want to come up.
  16. Offline


  17. Offline


    Have you uploaded v1.0 yet? I see it's updated, but the download still gives us 0.9
  18. Offline


    oops, got ahead of myself - try again now :)
  19. Offline


    not sure if I'm doing something wrong but this is the first mod I have tried but my sign clocks don't seem to be updating at night, only during the day, or at night if I manually put a torch nearby/remove it.
    this is with build 440
  20. Offline


    you are my hero:)
    --- merged: Feb 27, 2011 10:16 AM ---
    Color codes dont work for me:
    Announce-Format=&eReal-life-time\:&f %s
    -> &eReal-life-time:&f 11:15
  21. Offline


    Do you think it would be possible to turn your signs into reststone current generators?

    I have this mad idea to create a giant clock using ControllerBlocks, creating a set of numbers and letting them appear/disappear based on the hour of the day, but I can't find a mod that will generate redstone charges based on the in-game time.

    May I request a redstone update to this excellent mod?
    1. An option to have the sign produce a single 1 second charge every hour.
    2. An option to have the sign produce a series of one second charges, counting out the hour.
    3. An option to have the sign produce a redstone charge for an entire pre-set hour.
    The first two would be excellent for creating a lovely chiming clock for your house, while the third would allow my plan to build the giant clock using a set of 12 signs!
  22. Offline


    Use the § character not the & (don't forget to save in utf-8)

    Interesting... not too sure how practical 2 is... especially taking into account lag.... but it's possibly something I can work on.
    I can build 3 in such a way that you only need 4 signs (in fact I could do it in 2 but binary logic might drive you up the wall), 3 outputs per sign.
  23. Offline


    Hehe, number two would have been fun, but certainly not critical. My server is really only accessed over a lan anyhow (my 6 year old boy and I share a world), so lag issues don't phase me :D

    I wouldn't mind the advanced three output format as long as it wasn't the default. One universal broadcast output per sign would be the simplest for people to understand, and I envision sticking the signs right onto the side of my control blocks. Providing the three side advanced interface could be phenomenally helpful as well, but the most helpful would be being able to choose which mode was more appropriate :)

    I have fancy ideas like timed skylights, broad entryways that automatically seal up at night.. oh snap, that's another point, a time -range- would be lovely! Also, an option to pick real time or game time too, just like the clock, some people might like their time chimes to happen on the real hour, not the fake hour.

    I'm going to have to rig up a tick-tock note block for my fancy clock.

    With redstone becoming more and more useful you stand poised to be the only mod implementing time based functions. Fountains that run water in the day and lava at night! Time controlled harvesting Minecart Mania farming carts! And, of course, blocks that only appear or disappear at certain times of day!
  24. Offline


    ok thanks now it works.
  25. Offline


    Using craftbukkit build 478, plugin v1.0, I get this error after bootup:

    23:09:33 [INFO] Chunk (-5, 8) stored at (-16, 19)
    23:09:43 [SEVERE] java.lang.Throwable
    23:09:43 [SEVERE] at net.minecraft.server.LongHashtable.get(LongHashtable.
    23:09:43 [SEVERE] at net.minecraft.server.ChunkProviderServer.d(ChunkProvi
    23:09:43 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.getChunkAt(CraftWor
    23:09:43 [SEVERE] at org.bukkit.craftbukkit.CraftWorld.getBlockAt(CraftWor
    23:09:43 [SEVERE] at net.minecraft.server.World.k(World.java:360)
    23:09:43 [SEVERE] at net.minecraft.server.World.h(World.java:347)
    23:09:43 [SEVERE] at net.minecraft.server.World.f(World.java:317)
    23:09:43 [SEVERE] at net.minecraft.server.World.c(World.java:268)
    23:09:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlock.setData(Craft
    23:09:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlockState.update(C
    23:09:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftSign.update(CraftSi
    23:09:43 [SEVERE] at org.bukkit.craftbukkit.block.CraftBlockState.update(C
    23:09:43 [SEVERE] at au.net.fremnet.bukkit.TimeAnnounce.ClockSigns.update(
    23:09:43 [SEVERE] at au.net.fremnet.bukkit.TimeAnnounce.TimeAnnounceTask.r
    23:09:43 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512)
    23:09:43 [SEVERE] at java.util.TimerThread.run(Timer.java:462)
  26. Offline


    No idea what that is... I can't even tell what it's throwing - is there any more to that?
  27. Offline


    Seems to be working fine in CraftBukkit build 495
  28. Offline


    It won't let me put signs together on the same wall.
  29. Offline


  30. Offline


  31. Offline


    unfortunatly while there are work arounds for the problem, the problem exists that makes updating batches of signs close to one another unworkable - they do actually update but the server fails to send the packets (or some such)

    I'll probably re-read this after a sleep and ask myself wtf was I trying to say

Share This Page