[FUN] SignRotate v0.2 - Rotate Signs [1000]

Discussion in 'Inactive/Unsupported Plugins' started by jascotty2, Apr 9, 2011.

  1. Offline

    jascotty2

    Sign Rotate - rotates signs :)
    Version: Check DukkitDev for current version ;)
    while adding signs functionality to bettershop, i got to thinking:
    wouldn't it be neat if they could spin around on their own?
    well, shortly thereafter, here it is:
    a plugin that provides such useless and amusing functionality :)
    to set a sign rotating: run /sr, then click on the sign
    (to stop, click again, to stop setting them on & off, run /sr again)

    Features:
    rotates signs and skulls! :)
    ingame-configurable:
    - delay between each rotation
    - rotate direction
    permissions support:
    - signrotate.create to add/remove rotating signs
    - signrotate.admin to change plugin settings
    saves assigned signs & reloads at start

    Commands:
    /signrotate (sr) toggle sign adding
    /signrotate (sr) cw / ccw change rotation direction
    /signrotate (sr) delay <time> change delay interval (seconds)


    Todo:
    allow wall signs to "rotate" around its block
    iConomy support?
    allow blocks to rotate (not just signs) ?
    - if there is a sign/torch on a face, rotate 4
    - else, rotate 8


    Changelog:

    Version 1.0 - 2/6/14
    • Brought back into the modern world!
    • various code optimisations, threw out the old permissions and configs, and in with the new
    • database changed to binary format - uses less disk space, loads much faster!
    Version 0.2 - 7/4/11
    • Sign rotation thread moved to bukkit scheduler (more thread-safe)
      • added groupmanager-specific compatibility
      • permissions 3.x compatible
    Version 0.1.1 - 4/21/11
    • Fixed ConcurrentModificationException annoyance
    Version 1.0 - 4/9/11
    • Initial Release
     
    maetthew, Guidox264 and Finer1 like this.
  2. Offline

    Alexf

    MASSIVE MEMORY LEAK PROBLEM!

    :/
     
  3. Offline

    jascotty2

    @Alexf
    unless you provide specific examples and reproducible steps to prove your claim, don't assert that a plugin you tried is causing a "massive memory leak"
    the JVM will naturally collect more memory as it runs, and occasionally runs garbage collection for unreferenced memory if if is using too much memory
    "MASSIVE MEMORY LEAK PROBLEM!" does NOTHING to prove that it does have a problem or to help solve it if there is one
     
    maetthew likes this.
  4. Offline

    anon

    Works good for me = )

    One little problem is that when u destroy the sing it isnt removed from the configs.
     
  5. Offline

    jascotty2

    works fine for me (note: saves on a delay, not instant)
    if you're still having this issue after waiting 30sec, let me know what you did to get that error
     
  6. Offline

    Alexf

    Sorry, should have said more.

    I used a delay time of 0.1 and had 3 signs spinning at once.

    I have tested with no other plugins except essentials.

    Two different things happened: The first one was that the plugin just simply broke, and the server froze. The second thing that happened was that the entire server node died. I could not access my WinSCP or my SSH. Server itself had to be rebooted.
     
  7. Offline

    jascotty2

    well, it can be a bit of a resource (cpu) hog when running that fast.. you might have an older machine that shouldn't be trying to run something like this :p
    on a more serious note, i'm sure it could run more efficiently, though.. it is odd how much cpu it uses for a seemingly simple task.. i'll have to look into that
    edit: the cpu usage i saw in testing was the client, not server :/
    not sure why it crashed on you..
     
  8. Offline

    Alexf

    The server hosts are looking into this; possible bug/exploit for java machines.
     
  9. Offline

    relik0fages

    Before I install this plugin. Has there been an actual confirmation of the MEMORY LEAK?
     
  10. Offline

    jascotty2

    i have not been able to confirm the existence of any memory leaks
    (i also have an old computer as a server, & have had no problems with this running out of memory)
     
  11. Offline

    phaed

    02:07:03 [SEVERE] Exception in thread "Timer-1500"
    02:07:03 [SEVERE] java.util.ConcurrentModificationException
    02:07:03 [SEVERE] at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
    02:07:03 [SEVERE] at java.util.AbstractList$Itr.next(AbstractList.java:343)
    02:07:03 [SEVERE] at com.jascotty2.signrotate.Rotater$SignRotater.run(Rotater.java:120)
    02:07:03 [SEVERE] at java.util.TimerThread.mainLoop(Timer.java:512)
    02:07:03 [SEVERE] at java.util.TimerThread.run(Timer.java:462)

    use:

    int delay_seconds = 1;

    plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new Runnable()
    {
    public void run()
    {
    }
    }, 0, delay_seconds * 20L);

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 13, 2016
  12. Offline

    jascotty2

    Version 0.1.1:
    figured out how to avoid errors on modification (wasn't serious, just annoying)

    @phaed
    interesting suggestion.. didn't know about that method
    might add to next release, if i get to playing with it much
     
  13. Offline

    phaed

    Its not a question of whether you *might* add it. You *need* to add it, creating timer is not the right way of doing things and will cause thread safety issues to all servers who use your plugin.

    The Bukkit scheduler:
    http://javadoc.lukegb.com/BukkitAPI..._1bukkit_1_1scheduler_1_1BukkitScheduler.html

    Post on thread safety:
    http://forums.bukkit.org/threads/thread-safety.4027

    A quick tutorial:
    http://forums.bukkit.org/threads/sa...code-that-may-help-you-updated-04-01-11.10653
     
  14. Offline

    Plague

    considered inactive
     
  15. Offline

    jascotty2

    oops.... i forgot to update the title :rolleyes:
     
  16. Offline

    belfedia

    Thanks working good on cb#766 and add more fun on my server :)
     
  17. Offline

    MonsieurApple

    Considered inactive.
     
  18. Offline

    jascotty2

    not by me ;)
    i may be slow to update the title sometimes, but i haven't given up on my plugins yet
     
  19. Offline

    MonsieurApple

    Hehe sounds good :)
     
  20. Offline

    f4sasj4

    ya i think thi is very usefull
     
  21. Offline

    NickMiner69

    Hi Fella you might be the man i need to chat to im looking for a block to rotate around bit like the sign but from top to bottom and fence could be attached to it i have made a windmill and it would be so cool if this could go around. Any way its just a thought you seam the fella who could pull this off i will keep watching forums, p.s your plugins are great nick work Thanks NickMiner69
     
  22. Offline

    jascotty2

    ... odd, i've not had issues with it before..
    haven't got to using the scheduler yet because of a more used plugin i'm trying to finish some updates for :(
     
  23. Offline

    jascotty2

    well, finally got around to updating my smaller plugins, so here's that fix that's been on the back burner for a while:
    Version 0.2
    • Sign rotation thread moved to bukkit scheduler (more thread-safe)
      • added groupmanager-specific compatibility
      • permissions 3.x compatible
    @phaed
    hopefully this resolves the issues you've been having..
     
  24. Offline

    joerkig

    Do you think you could also do this with heads?
     
  25. Offline

    jascotty2

    ha, that's a fun idea :)

    i shall look into that
     
  26. Offline

    Goblom

    @joerkigWhats with the 2 year old topic nectro post ?
     
  27. Offline

    jascotty2

    why not?

    just because it's old, doesn't mean it doesn't work ;)
     
  28. Offline

    jascotty2

Share This Page