[MISC] SleepAnnounce v1.2.2 - Sleep/Awake Announcer/Report [1.4.5-R0.2]

Discussion in 'Inactive/Unsupported Plugins' started by sgtbigman, Mar 25, 2011.

  1. Offline

    sgtbigman

    SleepAnnounce - Sleep/Awake Announcer/Report
    Version: v1.2.2
    PermissionsBukkit, MultiVerse, and DispNameChanger support!

    A simple plugin to check who is asleep or not in your server. Made/updated with the request and great suggestions of JTR1988, further requests of michael05242002, and other great suggestions/tips by others of the bukkit community:cool:. My first plugin.

    Features (open)

    • Configurable sleep/awake announcements.
    • Configurable listing of players asleep/awake.
    • config.yml for easy configurations.
    • Op-only setting if PermissionsBukkit is not detected.


    Commands (open)

    • /sleeping [all|worldname]:
      • Lists players sleeping (and awake if this is set in the config) on current world (all worlds if from command line).
      • <all> or <*> option displays all players in all worlds in the server.
      • <worldname> option. Replace with actual name of world. Displays players in the specified world.
        • Shorthand capability.
      • Aliases:
        • /sl, /slp, /sleep
    • /announce <sleep|awake>:
      • Change whether sleep/awake announcements are displayed.
        • If on, switches to off (and vice versa).
      • Alias:
        • /an


    Permissions (open)

    • sleepannounce.list.default - Allows a player to use /sleeping without [all|world].
    • sleepannounce.list.all - Allows a player to use /sleeping all.
    • sleepannounce.list.world - Allows a player to use /sleeping worldname, where worldname is replaced with the actual name of the world.
    • sleepannounce.announce.sleep - Allows a player to toggle the sleep announcement.
    • sleepannounce.announce.awake - Allows a player to toggle the awake announcement.
    Parent nodes:

    • sleepannounce.list.* - Allows player to use all /sleeping variants.
    • sleepannounce.announce.* - Allows player to use all /announce variants.
    • sleepannounce.* - Allows player to use all SleepAnnounce commands.


    Changelog (open)

    Version 1.2.2
    • Updated code to work with latest build.
    Version 1.2.1
    • Fixed announcement bugs (coloring conflict with DispNameChanger).
    • Added the ability to use shorthand on /slp [worldname] command.
    • Added
    • as an alternative to the [all] in /slp [all].
    Version 1.2.0
    • Added PermissionsBukkit support!
    • Removed Permissions 3.x support.
    • Added DispNameChanger support!
    • Cleaned up code.
    Version 1.1.0

    • Added MultiWorld support!
    • /sleep - now displays only those players in the sender's world (if the sender is a player).
      • If the sender is not a player, /sleep displays all players in all worlds.
    • /sleep all - displays all players in all worlds.
    • /sleep <worldname> - Displays players in specified world.
    Version 1.0.0

    • Added Permissions support!
    • If SleepAnnounce/config.yml does not exist, the .jar creates/fills it now.
    • Add /announce <sleep|awake> command which allows players/admin to change whether sleep/awake announcements are broadcast to the server.
    • Some code cleanup.
    • First "Major" release: Everything requested is in the plugin now.
    • Thank you for your continued help/support!
    Version 0.3.6

    • Changed version format to Major.Minor.Non-critical
    • Fixed spacing between playername1,playername2 to playername1, playername2
    • Also added a comma at end of awake players list before sleeping players list.
    • Tested against latest craftbukkit build (677) - Works.
    • Non-critical update - just fixed a little display error.
    Version 0.35

    • Cleaned/Tidied up the config file for ease of reading/use.
    • Used updated Craftbukkit code which deals directly with beds! (They must have known what I was working on and what you guys wanted). :p
      • This helped with announcements working as they should.
    • Added aliases to the /sleeping command: /sl, /slp, and /sleep.
    • Added an announcement for awaking players (toggable). ({Player} has awoken.)
    Version 0.3

    • Added config file (/SleepAnnounce/config.yml) to allow easy configuration by admins.
    • Updated code to work with config file and work with latest recommended build (617).
    Version 0.2

    • Added ability to turn announcements on/off and check status (on/off).
    • Added ability to display sleeping/awake players in a colored list (red: sleeping/green: awake). If /sleeping color off, default two lists display (sleeping: (names) & awake: (names)).
    Version 0.1

    • Release


    Download SleepAnnounce v1.2.2
    Source Code

    Latest build: Compatible with CB[1.4.5-R0.2].
     
  2. Offline

    sgtbigman

    updated to v.0.3.6
    - Added spaces between the players names after commas in the lists. (Strahan & Maxis010)
    - Added the comma after the awake players list before sleeping players list. (Maxis010)
    - cb build 677 compatible

    ksevelyar: What were you attempting in particular when this error was thrown?
     
  3. Offline

    ksevelyar

    All works fine with 0.3.6. Thank you.
     
  4. Offline

    sgtbigman

    Ok, great! By the way, your avatar is epic.
     
  5. Offline

    Maxis010

    Thank you for the format update but... (Picky Request Alert)

    Can you add some form of checking with your commas so that the last name doesn't have a comma (for both lists) and to go with that the comma between awake and asleep only shows up if there are people Awake AND Asleep
     
  6. Offline

    Strahan

    Yea I should have clarified. My problem was the separation of in bed and out of bed. Your commas were fine for the list of each type, but when the red abuts the green it was crammed together. Have to d/l and check the updated ver, thanks :)
     
  7. Offline

    Maxis010

    You now get loads of commas and good seperation
     
  8. Offline

    Maxis010

    Haven't had any trouble in the 700+ test builds so lets hope the recommended build works just as well (when it returns that it, accursed disappearing builds)

    Off Topic
    I see you are following DeathStats, should have a "final" release for that soon enough with config verification along with better error catching
    If you have any ideas or find a bug then either convo me or make an issue
     
  9. Offline

    sgtbigman

    Works with 733 Recommended Build as well. Now that a rec. build is out, I will work on Permissions support.

    Maxis - Thanks for testing all of those builds (There were a lot!). As for DeathStats, I will definitely let you know of anything. Sounds like a great addition to my server needs.

    As always, thank you everyone for your continued support!
     
  10. Sometimes (I think when it's raining) if you rightclick a bed during daylight, it will print that you're going to sleep.... are you checking lightlevel by any chance ? Why not just check time ? Or if it's possible, why not just hook player getting into bed :}
     
  11. Offline

    sgtbigman

    I'm using direct methods from bukkit for player bed entering and exiting events, so those issues could only be the result of an error in the bukkit code (or even notch's code since bukkit is based off of it).

    Even so, what plugins are you using alongside SleepAnnounce? Maybe I could bring this to the attention of the bukkit gurus. Thanks in advance!
     
  12. Well, I have mcMMO that hooks rightclick on beds to set spawn point and I think that's it, no other bed related plugins :}
     
  13. Offline

    sgtbigman

    https://github.com/sgtbigman/SleepA...bigman/SleepAnnounce/SleepPlayerListener.java

    That is the code that listens for a player going to sleep. Should only run onPlayerBedEnter and onPlayerBedLeave. Almost positive that odd behavior has to do with the onPlayerBedEnter being modified by some other source; it's a direct method of bukkit, I'll try to recreate this sometime, but it may also have to do with mcMMO, although I highly doubt it.

    Permissions support by Friday :)
     
  14. I tried to recreate the conditions but I couldn't, I started rain, I set time near to night, near to morning, it shows the messages right as they should.

    I dunno how that player triggered the sleep even without sleeping, he said he rightclicked the bed but he wasn't in bed :/ must be a bukkit or lag thing :}
     
  15. Offline

    sgtbigman

    v1.0.0
    First Major Release
    Permissions support!
     
  16. Offline

    Maxis010

    Good man
    Now how about a v1.1 with multiworld support, right now when you /sleep it lists everyone, not just the people in that world
    In your own time obviously
     
  17. Offline

    sgtbigman

    one little bug to fix for it and you will have Multi-world support :) thanks for pointing that out Maxis!
     
  18. Offline

    Fearlessagent

    I've been using this and it was working at first. Then all of a sudden when we would try to sleep we would all get kicked out of bed without it turning day. Removing the plugin fixed the problem. No errors anywhere though. Any idea how i can fix it, or do you think its a bug in the plugin?

    EDIT: It worked the first time after removing it but this must be a bug with minecraft or bukkit itself because it keep happening.
     
  19. Offline

    sgtbigman

    hey Fear - this plugin should not affect how one sleeps/wakes up, it is just a plugin to list those sleep/awake and to announce when players go to sleep and/or awake from sleep. You seem to be right in saying that it is a bug with bukkit or minecraft; I believe it is the latter just because bukkit has usually been very thorough at fixing bugs and making everything work as it should. I apologize for the inconvenience, and I'll see if the plugin does bring this bug to the forefront more often, but I am 100% positive my plugin could not be the culprit for this kind of bug. Thanks for letting me know either way.
     
  20. CraftBukkitUpToDate is bugging me to give it your download link :)

    Edit: Also, any update on next release?
     
  21. Offline

    Poeschl

    Is this version compatible with 818?
     
  22. Offline

    sgtbigman

    yes. just verified. should have updated the thread earlier. Enjoy.
     
  23. Offline

    sgtbigman

    v1.1.0 released!
    MultiWorld support as requested by Maxis010.
    Let me know of any bugs/other requests and thanks for your patience.
     
  24. Offline

    sgtbigman

    Just checking if anyone has had any issues with this since latest release, but I'm thinking the silence means there are no problems. Enjoy!
     
  25. Offline

    Maxis010

    All good on the English front
     
    sgtbigman likes this.
  26. Offline

    Trenny

    No problems with Bukkit-1000? :)
     
  27. Offline

    sgtbigman

    I briefly tested it the other day. It should work; Let me know of any issues though. I forgot to update this thread's craftbukkit compatible version #! Thanks for the reminder, Trenny. :D
    Enjoy!
     
  28. Offline

    Montpelier

    Working fine in 1060, and still extremely useful for smaller servers.

    ~~ NICE ~~
    ( ^ _^)--------b
    ~~ NICE ~~
     
  29. Offline

    sgtbigman

    Thanks for testing it on 1060! Glad it's still of use. :)
     
  30. Offline

    ksevelyar

    sgtbigman likes this.
  31. Offline

    sgtbigman

    Definitely. I'll work on it when possible and let you know when it's updated.
     

Share This Page