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

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

  1. Offline

    freman

    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

    Features:
    • 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
    Screenshot:

    [​IMG]
    Video:


    Plans:
    • 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

    TimeAnnounce.properties:
    • 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
    Changelog:
    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.


    Support:
    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.
    [​IMG]
     
  2. Offline

    freman

    aaaah ok, that means it's a problem with my math - I didn't think to change the resolution while testing - I'll look at that
     
  3. Offline

    An0nx

    Yepp, changing the config has worked for me too.
    Thanks for the plugin!
     
  4. Offline

    Don Redhorse

    hi, would it be possible to also display the timezone on the default [CLOCK] sign?
     
  5. Offline

    BigBlueGER

    Doesn't work, doesn't even creates a .properties file on 252
     
  6. Offline

    ssechaud

    Using CB build 271 and TA v0.5 I am getting errors:

    TimeAnnounce version 0.5 is enabled :)
    Exception in thread "Timer-1" java.lang.NoSuchMethodError: org.bukkit.Server.getWorlds()[Lorg/bukkit/World;
    at com.bukkit.freman.TimeAnnounce.ClockSigns.update(ClockSigns.java:105)
    at com.bukkit.freman.TimeAnnounce.TimeAnnounceTask.run(TimeAnnounceTask.java:18)
    at java.util.TimerThread.mainLoop(Timer.java:534)
    at java.util.TimerThread.run(Timer.java:484)
     
  7. Offline

    freman

    Yep it's broken.

    I have other commitments but I'll see if I can have a look at it tonight or tomorrow - otherwise it's the weekend.
    --- merged: Feb 8, 2011 1:13 PM ---
    Ok folks, it's been updated to build 276 and now supports multiple worlds - sorry I've not fixed the game-clock-resolution issue yet... no eta... need more working brain cells (working on encryption and compression at work all day, math escapes me by the time I get home)
     
  8. Offline

    captainbinary

    I get this error when starting my server.

    Code:
    Feb 9, 2011 12:14:18 AM org.bukkit.craftbukkit.CraftServer loadPlugins
    SEVERE: org.bukkit.Server.getWorld(Ljava/lang/String;)Lorg/bukkit/World; (Is it up to date?)
    java.lang.NoSuchMethodError: org.bukkit.Server.getWorld(Ljava/lang/String;)Lorg/bukkit/World;
            at com.bukkit.freman.TimeAnnounce.ClockSigns.load(ClockSigns.java:44)
            at com.bukkit.freman.TimeAnnounce.TimeAnnounce.onEnable(TimeAnnounce.java:108)
            at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:135)
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:394)
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:175)
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:69)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:50)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:167)
            at net.minecraft.server.MinecraftServer.c(MinecraftServer.java:154)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:106)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:202)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:512)
     
  9. Offline

    freman

    You need to update your bukkit
     
  10. At my Server the Plugin only write the Time once at the first hour, after that I get no message.

    Should it not write every hour a message?
     
  11. Offline

    freman

    I'll have a look at that for you - it should indeed be every hour unless something has crashed.
     
  12. Offline

    rjwboys

    im having the same issue
    Code:
    Take yourself wonder by wonder, using /magiccarpet or /mc. MagicCarpet version 1.4 is enabled!
    2011-02-10 16:36:29 [INFO] Loaded EssentialsBan bTeamCity by Zenexer, ementalo, Eris, and EggRoll
    2011-02-10 16:36:29 [INFO] Loaded EssentialsHelp bDev297 by Zenexer, ementalo, Eris, and EggRoll
    2011-02-10 16:36:29 [INFO] [BlockHead] Found Permissions plugin. Using it.
    2011-02-10 16:36:29 [INFO] BlockHead version 0.2.2 by zand is enabled!
    2011-02-10 16:36:29 [INFO] Loading map 'org.dynmap.kzedmap.KzedMap'...
    2011-02-10 16:36:29 [INFO] Loading renderer 'org.dynmap.kzedmap.DefaultTileRenderer'...
    2011-02-10 16:36:29 [INFO] Loading renderer 'org.dynmap.kzedmap.CaveTileRenderer'...
    2011-02-10 16:36:30 [INFO] Set minimum priority for worker thread
    2011-02-10 16:36:30 [INFO] Map renderer has started.
    2011-02-10 16:36:30 [INFO] Dynmap WebServer started on null:8123
    2011-02-10 16:36:30 [INFO] [MultiVerse] Loading World & Settings - 'world' - NORMAL
    2011-02-10 16:36:30 [INFO] [MultiVerse] Loading World & Settings - 'nether' - NETHER
    Preparing spawn area for nether, 32%
    Preparing spawn area for nether, 77%
    2011-02-10 16:36:32 [INFO] [MultiVerse] - Version 0.5.3 Enabled
    2011-02-10 16:36:32 [INFO] Done! For help, type "help" or "?"
    2011-02-10 16:36:34 [INFO] CraftIRC - Joined main channel: #910minecraft
    2011-02-10 16:36:34 [INFO] CraftIRC - Joined admin channel: #910minecraftadmin
    Current time is: 17:00
    2011-02-10 17:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Starting backup process..
    2011-02-10 17:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Rebuilding Cache. This can take several minutes, depending on the world size.
    2011-02-10 17:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Deleting cache, might be obsolete.
    2011-02-10 17:31:53 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.IOHelper) deleting old backup file: world-backups/world_20110120-2344540821.zip
    2011-02-10 17:31:54 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Backup sucessfull
    2011-02-10 18:01:19 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Deleting cache, might be obsolete.
    2011-02-10 18:01:22 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl$CacheCleanerTask) Cache lifetime ended.
    2011-02-10 18:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Starting backup process..
    2011-02-10 18:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Rebuilding Cache. This can take several minutes, depending on the world size.
    2011-02-10 18:31:52 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.IOHelper) deleting old backup file: world-backups/world_20110120-2359540802.zip
    2011-02-10 18:31:53 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Backup sucessfull
    2011-02-10 19:01:19 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Deleting cache, might be obsolete.
    2011-02-10 19:01:21 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl$CacheCleanerTask) Cache lifetime ended.
    2011-02-10 19:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Starting backup process..
    2011-02-10 19:29:25 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.CacheControl) Rebuilding Cache. This can take several minutes, depending on the world size.
    2011-02-10 19:31:57 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.IOHelper) deleting old backup file: world-backups/world_20110121-0329110250.zip
    2011-02-10 19:31:57 [INFO] [BackupPlugin] (com.mysticx.bukkit.backupplugin.BackupUnit) Backup sucessfull
    
     
  13. Offline

    ElementalBliss

    I do believe it is broken on Build #302. Upon the console popping up I see this:

    [​IMG]

    As you can see, "Timer-0" broke.
     
  14. Offline

    freman

    No, sorry, I can't see, the image is broken, but I'll have a look tonight when I get home.
     
  15. Offline

    ElementalBliss

    Awh. I'll edit it. My bad; I don't know why it broke.
     
  16. Offline

    freman

    I see what that is, I'll have that fixed for you tonight (check back here in 5 hours) - feel free to bring desk for me to beat head against.
     
  17. Offline

    ElementalBliss

    It's the only thing keeping me from CB 302 [I believe that's latest]. Also; the game time is wrong. It went by 12:00 three times before the sun came up.
     
  18. Offline

    freman

  19. Offline

    ElementalBliss

  20. Offline

    freman

    All pending issues should hopefully be resolved, note I haven't spent an hour testing it yet so I've only seen one announcement, let me know if that's still broken. (I've been working on another plugin at the same time)
     
  21. It's still broken I get only one announcement, after that nothing, no error, or something else.
     
  22. Offline

    freman

    ok, i'll take a look in the morning - probably my thread dying.
    --- merged: Feb 13, 2011 8:40 AM ---
    I'm testing now - takes 2 hours to test *rolls eyes*
    --- merged: Feb 13, 2011 9:02 AM ---
    duuuuh how could I have been so fricking retarded... ok... patched and testing the patch
     
  23. Thank you. I'm looking forward to the Patch.
     
  24. Offline

    freman

    All fixed, enjoy
     
  25. Now it works fine. Thank you very much.
     
  26. Offline

    oOunrealOo

    dude on the first pic can u send me the link to the map pluggin plz?
     
  27. Offline

    Padeius Etoh

    I have this on b325, it sends the time to the console but when I try to make a sign it just doesn't update the time. I use the [CLOCK] on the top line, tried it with game at the bottom it just doesn't work, any ideas.
     
  28. Offline

    Jandalf

    i have the same problem: make a reloog and then it works...

    my question: is it possible that u make an option, so that i can adjust the announcement intervall, like:
    announcementIntervall = 60 ?
     
  29. Offline

    Padeius Etoh

    what is a "reloog"
     
  30. Offline

    Jandalf

    i mean re-log in with your minecraft client on the server
     
  31. Offline

    freman

    There's a bukkit/minecraft bug preventing some signs from updating - especially if they're too close together...
    --- merged: Feb 19, 2011 3:46 PM ---
    Zan's Mod - have a look on the minecraft forums.
     

Share This Page