Inactive [MECH] SignClock v1.8.2 - View the in game time on Signs [1060]

Discussion in 'Inactive/Unsupported Plugins' started by V10lator, Jul 7, 2011.

  1. SignClock - View the in game time on Signs.

    Moved to http://dev.bukkit.org/server-mods/signclock/
    Licence
    GPLv3 or later (Sources includes in the jar)

    Changelog:
    Version 1.8.2
    • Updated for lib24time 0.7.
    Version 1.8.1
    Version 1.8
    • Updated for lib24time 0.6.
    • Removed a useless log message (Bug report from: Navigateur).
    • Hopefully fixed a few bugs in the marquee code.
    Version 1.7.2
    • Fixed a bug which prevents users not having the permissions to destroy SignClocks to destoy any blocks.
    Version 1.7.1
    • Fixed the lib24time detection to the right version.
    Version 1.7
    • Added better daytime scrolling (still not pefect!)
    • Added PermissionsBukkit support (not tested).
    Version 1.6
    • Removed MagicSign.
    • Added /SignClock as MagicSign replacement.
    • Removed daytime clock.
    • Added daytime theme tag.
    • Cleaned up code.
    • Changed save file fomat but save files since 1.3 should get converted to the new format.
    Version 1.5
    • Added daytime clock (you have to update lib24time, too! ) (request from Marcos Cosmos).
    • Reworked save file handling (you know it from some of my other plugins: reduced diskwites).
    • Added MagicSign.
    • Cleaned up code.
    • Rewoked code parts here and there.
    • Hopefully fixed the bug reported by chickenmove.
    • Made everything you write on the sign (exception: theme names) case insensitive.
    • Changed save file fomat but save files since 1.3 should get converted to the new format magically. ;)
    • Changed block power detection.
    Version 1.4.2
    • Updated plugin for lib24time 0.2
    • Changed craftbukkit includes/functions with bukkit ones (craftbukkit is no longer a building dependency).
    Version 1.4.1
    • Fixed a bug (self-triggered clocks won't reset after server reload).
    Version 1.4
    • Fixed a memory leak.
    • Changed display update timings (for self triggered clocks).
    • Added left-click support.
    • Cleaned up code.
    Version 1.3
    • Exported the themes to customizable theme files.
    • Added an option to use the Clock without redstone.
    Version 1.2
    • Splitted out lib24time
    Version 1.1
    • Fixed a Bug (the display won't update always)
    Version 1.0
    • First public release
    Older downloads:
    Download v1.8.1
    Download v1.8
    Download v1.7.2
    Download v1.7.1
    Download v1.7
    Download v1.6
    Download v1.5
    Download v1.4.2
    Download v1.4.1
    Download v1.4
    Download v1.3
    Download v1.2
    Download v1.1
    Download v1.0
     
    jon674, nandinho and Marcos Cosmos like this.
  2. Offline

    Andre_9796

    add external downloadlink in case guests cannot see attachments
     
  3. Offline

    rolandostar

    Testing..., im curious about this "themes", you should put screenshotz :D

    Edit:
    Problem, I write the [SignClock] on the second line of the sign, click done, appears in chat "signclock creaed" and then does nothing, what am i doing wrong?

    Edit2: forget it, i made it work :D
     
  4. Added a few Screenhots. But the themes are animated, so you don't see the that much there. ;)

    //EDIT: @rolandostar: For a Update of the "display" (the sigh text) you have to pull it with redstone. Simply connect it to a redstone clock/pulsar. :)
     
  5. Offline

    Plague

    please update to latest recommended build
     
  6. Offline

    woodzy

    without redstone? and set tickrate in config?
     
  7. Plague: Sorry, it was just a copy&paste error. It was testet against 953.

    woodzy: Hm, I like it more with redstone but maybe some day... :)

    @All: More "24h clock plugins" will follow. I just managed to split some parts of the plugin into a library. :)
     
  8. Offline

    Sathex

    I agree with woodzy. My suggestion would be that you could choose if you want to use it with Redstone or not. Maybe you could do that in a/the config file?


     
  9. Is it allowed to discuse development here?
    Because this still is my first java app. If I would like to do it self-triggered, I have to start a new thread and work with
    Code:
    while(true)
    {
      SignUpdateCode();
      sleep(x);
    }
    or something very similar, true?

    And I have another question: If I start a new threat for a plugin, can I access the whole bukkit API from it? So if for example the redstone state on a block changes, can I read that change from within the new threat?

    Of course I could try that but then I have to figure out how to start a new threat first. I wont do that if the new threat can't do what I want it to do. :)

    //EDIT: I'm currently adding it. But without a config file. All config will be handled on the sign. ;)
    But I think this needs time. I worked hard at the code and right now theme file support is at around 90% (It works but has some issues) and self-triggered clocks don't work at this time. :(

    //EDIT²: Had no access to my working PC for a few days but today I raced through the code and fixed all things up. Have fun with it. :)

    //EDIT³: Oh, and be warned: The save format has changed so your old clocks won't work after the update. Delete the plugins/SignClock folder and re-create your clocks or convert the file plugins/SignClock/data.sav to plugins/V10lator/SignClock.sav
    To do that add 1 to the last number of the lines and after that attach ",0" to them.
    Example Before:
    Code:
    world,-31,65,-62,1
    world,-8,66,-13,0
    world_nether,-10,60,4,0
    world,-240,64,10,4
    world_skylands,382,61,-72,0
    world,-51,65,-7,0
    world,150,72,-4796,0
    After:
    Code:
    world,-31,65,-62,2,0
    world,-8,66,-13,1,0
    world_nether,-10,60,4,1,0
    world,-240,64,10,5,0
    world_skylands,382,61,-72,1,0
    world,-51,65,-7,1,0
    world,150,72,-4796,1,0
    Tipp: Replace the ",0" with ",1" to convert the clock to a self triggered one.

    It's highly recommended to stop your server before converting the file!
     
  10. Offline

    chickenmove

    does not work ;( i wirte it on the signs with ST and so but it comes no clock :I
     
  11. Are there any errors in the console/log when you create the clock?
    Do you receive a message that it's created?

    Please note also that "[SignClock]" and "ST" are case sensitive (not 100% sure now, but I think so). This will be changed in a future release.
     
  12. Offline

    Marcos Cosmos

    Could you add a feature that allows it to tell you which stage of the day it is in? like a [STG] tag in the themes that has the variables: Dawn, Day, Dusk and Night. I'm sure you could determine which stage it is based on the appropriate time in your 24 hour system, through the TimeAndWeatherControl plugin i discovered that in your plugins time, those times probably start: dawn at 4:00, day at 6:00, dusk at 18:30 and night at 20:30, I also know that day is 10 min long, night is 7 and dawn/dusk are each 1 and a half minutes long. Hopefully that might help.. I'd do it myself but I haven't learned anything about Java ><
     
  13. Marcos Cosmos: This should be easily implementable. I added it to the ToDo list. :)
    //EDIT: Do you want the time + stage of day on one sign (theme based) or time or stage on a sign, choosable by creating?
     
  14. Offline

    niugnip

    Will you add permission-support?
    like 'signclock.basic' and 'signclock.st' :)
     
  15. I didn't work with permissions before but it's on the to-do list.
    But a few moments ago there was a release which added a MagicSign. Have a look at it for now. ;)
     
  16. Offline

    MCrofl777

    hmm... :( does not work!
     
  17. hmm... :) I like dogs!

    No, really, what does not work?
    Errors (log)?
    Which version of bukkit?
    Which version of lib24time?
     
  18. Offline

    Marcos Cosmos

    Cool Thanks! :3, and I would like it to be theme based please (I haven't looked at it yet as I just got home, it probably IS theme based already by the sounds of it)... and could you possibly customisable names for these times of day? It would be useful for RPG servers and help to get around the theme issue :3, tbh I ask partially because I was thinking of using the names I mentioned in the initial request of dawn and dusk lol. Not that I'm complaining though!, It really doesn't make much difference, really I'm just pleased you implemented it.

    Edit: Looked into it. Idk how to create a theme that includes it because I don't know how to add it to themes (otherwise I would be uploading one now :D) is it possible yet or will that need to be added to your to do list? o:
    Thanks again!
    Marcos Cosmos
     
  19. Umm... will have a look into it... ;)
    The themes for normal and daytime clocks are exactly the same.
    So wite your theme (use colors like "[RED]" if you like) and where you want the daytime to be shown write "[TIM]". :)
    The problem is that "[TIM]" is exactly 5 characters long, like "hh:mm". But the daytime has a variable length.
    That's why the default themes don't look good with daytime clocks: The line containing "[TIM]" is (sometimes) more than 15 characters long, which is the sign limit. So currently you choose the type of clock by creating. But I think I have to change this... ;)
     
  20. Offline

    Marcos Cosmos

    Okay well to be perfectly honest I was planning on replacing the "Clock" text, or that line with the stage of day info. And I would create new themes anyway coz honestly I don't like the - stuff - look, was going to Maybe do some of those but also completely new themes with the - at different parts. or say as a top/bottom or full border (and not necessarily a -), but also, I was personally going to use "dawn, day, dusk and nite", which although Nite is slang, creates a situation where the longest length is 4. and besides my server is really small, pretty much only use it with my little brother :p. In any case, I understand why it fails with standard themes, and any default theme should only function with the default names for the stages, I was thinking more of adding an additional portion to the previously mentioned [STAGE] or [STG] tag, where it takes four words seperated by commas as the stages... I assume it would be simple to create an overflow prevention check statement thing (would be an IF statement on VB or python, only languages I know besides CSS and HTML which don't really count. xD). For example, if it the length would exceed the limit of that line, replace that line with the default values of the stages in the center by itself, without any of font or text that line the theme was written have. And this would them require a tutorial for the themes that would explain that the length can't exceed 15 etc. I'd be happy to make one if you needed the help. I'm afraid I can't do videos though.

    Anyway, I would like very much to be able to have the stage of day and full time in the same sign (that was my original idea). Though I understand it might take some work. Please implement it though, if you have the time :)

    Edit: I misunderstood the problem slightly... it would probably be a good idea to make sure that the stage of day always takes up the same amount of space as the longest-name of the names for the stages, by for example adding spaces in place of characters for the shorter ones? (if possible)
    Edit Edit: OH I see the problem.. (didn't know that the [] tag bits still took up space on the visible signs) Still, there are Some themes we can use, and I'd still like to see it made possible to keep the length of each stage the same as the longest, though now I'm thinking it would be quite hard.. ><
    Oddly though, it didn't seem to have the same effect of the top and bottom lines (they only had one tag?) : [GREEN]---------------
    [GREEN]|[BLACK][TIM][GREEN]|
    [GREEN]|[BLACK][TIM][GREEN]|
    [GREEN]---------------
    [BLACK]---------------
    [BLACK]|[GREEN][TIM][BLACK]|
    [BLACK]|[GREEN][TIM][BLACK]|
    [BLACK]---------------

    I have double time lines because I'm just messing around with themes though I plan to replace the top TIM with the Stage one
    btw, I believe if you have [STG] I believe it has the same length as night, so you could use " " "dawn ", "dusk " " day " and "night" couldn't you? though the themes still have to balance for it.

    Also I just remembered that I was originally thinking of having different colours for each stage... Honestly though I don't expect that implemented any time soon since just having it implimented as a tag seems to cayse enough hassle :(
     
  21. Offline

    kralicinora

    Hi, Ive a little problem. When I place sign with:

    [SignClock]

    ST

    on wall or ground im getting this errors:

    Code:
    2011-07-28 11:20:35 [SEVERE] Could not pass event PLAYER_INTERACT to SignClock
    java.lang.ArrayIndexOutOfBoundsException: -1
        at java.util.ArrayList.elementData(ArrayList.java:338)
        at java.util.ArrayList.get(ArrayList.java:351)
        at com.V10lator.SignClock.SignClockPlayerListener.onPlayerInteract(SignClockPlayerListener.java:99)
        at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:458)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:85)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    When i try basic sign controled by redstone i can see no errors in log, but on sign i have text "ThemeNotFoun 1".

    Thx for help and sorry for my poor english :(
     
  22. Offline

    Marcos Cosmos

    @kracinora: this might seem a little bit rude since I can't tell you how to fix it. But I'm just wondering, does the error occur when you place a sign or when you left/right click a sign that has [SignClock]? It looks like its when you click a SignClock but I was just wondering (though I think it would be important as they would be two very different errors).
     
  23. Offline

    niugnip

    Had the same issue. When you look in your restart / reload-log you will see another issue "theme folder could not be created". Just add this folder manually:
    Code:
    plugins/V10lator/themes
     
  24. Offline

    kralicinora

    Yes, im sorry, after few tests i figure out the errors appears only when i left/right click on sign. ST sign does not work at all and sign controlled by redstone show me the time but getting theme error on sign.

    Ill try make themes folder manualy.

    When i manualy created folder for themes, everything is ok. Thx for help.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  25. kralicinora: Thx for that. Which operating system are you using and are there any other errors before "theme folder could not be created"?

    Marcos Cosmos: Wow, much text, I will read the whole text later but please have a look at the newest release (give me a few minutes after this post to update the tread). It has [DTC] as a theme tag now, which will get replaced with the daytime. To prevent ugly themes it scrolls the text on the sign, so it should never take more or less than 5 characters.
    This scrolling code is experimental and very often shows nothing (because every daytime is extended to 15 characters with the help of spaces at the end which will scroll, too) but I hope I can optimize the code later. :)

    @All: MagicSign or command? :)

    //EDIT: Marcos Cosmos: Okay, to use on daytime names I have to rewrite the code a bit because what you can read on the sign now is a return from a function in lib24time. ;)
    If you write some nice themes and want to share them: You know where you can find me. They could be some new default themes. The default themes now where some kind of... "I just need themes (for testing), f**k on the look"... :D
    And yes, a color tags need (if I remember correctly) 2 characters on the sign. This is a limitation of minecraft. ;)

    //EDIT²: Different stages with different colors? Maybe if we change the theme format and add (as first or last line) a wrapper, somethink like:
    Code:
    Midnight=[GREEN],Night=[YELLOW],Morning=...
     
  26. Offline

    Marcos Cosmos

    @V10later: I haven't had a chance to look at magic signs yet, been busy writing all that text hehe, I don't actually understand what they do from your description but I'll edit this post once I look into it. Btw thanks again, the scrolling thing solved what I was trying to address in the long post xD, only issue now is the amount of lagg I'm starting to get because I host the server on the same machine as I log into the client with, not sure if theres anything you can do about that though :p

    Edit: Well, I like that it displays permissions, but I think that most admins will want to use commands so they can tighten security in the heat of the moment to stop grieving rather than have to go seek out their sign. Personally I have no permissions use for this plugin so it's just a suggestion ^^
    Edit Edit: Maybe instead of making it scroll through the text of 15 characters you could make it scroll through the text of 7 characters? (the length of the longest word (morning) is 7.), it'd be easier to read ^^, though less compatible with the editable length.. Nvm I just realized why not xD. But none the less now I know whats going on while I build underground (I pretty much solely build underground lol)

    The wrapper sounds perfect! I've got a Very basic theme right now, I'm mostly going to be focusing on borders when I get around to making themes but right now I've got to hit the hay, talk more tomorrow :3

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  27. All right, then there will be no more updates till tomorrow. :)

    Will have a look into this, too. I think I have to reduce API-Calls (for exapmle it asks lib24time for the daytime even when the theme has no [DTC] inside).

    //EDIT²: Custom colors / stage names doesn't seem to be that easy. But I can give you a modified lib24time if you want. Simply tell me which name you want at which time. Oh, and maybe I can add colors to the output from lib24time, so they get adopted on the sign.
    But be aware that I woudldn't give support for such a modified library.

    //EDIT³: No colors possible though a modified lib24time. I don't know why (and I don't want to) but it get's a null pointer expection.
     
  28. I download the 1.7 version but still stay in 1.5? (same as 1.6 but don't work here)

    Code:
    2011-07-28 19:54:52 [INFO] [SignClock] 5 Themes loaded.
    2011-07-28 19:54:52 [SEVERE] Error occurred while enabling SignClock v1.5 (Is it up to date?): com.V10lator.lib24time.l24t.getDaytimes()[Ljava/lang/String;
    java.lang.NoSuchMethodError: com.V10lator.lib24time.l24t.getDaytimes()[Ljava/lang/String;
        at com.V10lator.SignClock.triggerTicker.<init>(triggerTicker.java:18)
        at com.V10lator.SignClock.SignClock.onEnable(SignClock.java:72)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:126)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:878)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:272)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:162)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:146)
        at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:284)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:271)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:148)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:335)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    [SignClock 1.7] - [lib24time 0.4]

    Any idea?
    Cordialy
     
  29. Navigateur: This is strange, Maybe I did something wrong by packaging, will habe a look at it.
    And to solve the error
    Code:
    java.lang.NoSuchMethodError: com.V10lator.lib24time.l24t.getDaytimes()[Ljava/lang/String;
    please update to the newest version of lib24time. Even if it's strange because the plugin should check the version of lib24time long before that call... :/

    //EDIT: I had fotgotten to update the plugin.yml. This is fixed and shouldn't be a real error, too. :)

    //EDIT²: And I had fogotten to upload the newest version of lib24time. I'm so sorry. :(
     
  30. It run perfectly now, no error, it's ok IG too ^^
    So nice i love this plugin x)


    Ps: Don't forget to edit this ;p
    to
     
  31. Offline

    Marcos Cosmos

    In relation to the lagg: Yeah please, yesterday I couln't seem to hit blocks 7/10 attempts when I'm near a signclock (though that was when I was lagging most, and wasn't in the original version, the 1.5 and 1.6, which were the ones with the stage,) and if I placed two signclocks in the same room I couldn't remove them or any blocks ><, had to have my brother do it.

    Anyway, no problem with the colours, they weren't important anyway. As for the modified stage name, the previously mentioned Dawn, day, dusk and nite please ^^, they wouldn't need scrolling, though you don't have to go to the trouble of removing it.

    Thanks again,
    Marcos Cosmos
     

Share This Page