No Sleep

Discussion in 'Archived: Plugin Requests' started by 544nick101, Nov 24, 2011.

  1. Offline

    544nick101

    Hello, I Have A Idea For A Plugin
    Name : No Sleep
    Purpose : So When Someone Right Clicks On A Bed They Can Not Sleep
    Notes: It Should Say When Someone Right Clicks On A Bed "You Can Not Sleep"
    Permissions : nosleep.cansleep Super Perms?
    Thank You For Taking The Time To Read This Thread
    I'll Be Very Happy If Someone Would Make This
     
  2. Offline

    tomjw64

    I think that I could possibly do this. This would be my first actual plugin, so hopefully it works out.
     
  3. Offline

    iidunno

    I'll start working on it.
     
    dark_hunter likes this.
  4. Offline

    tomjw64

    oh :/ uh... I guess I will keep working just in case.
    I mean, hell, this should only take like 20 minutes...
     
  5. Offline

    iidunno

    Well I can't seem to get mine working, wanna work together over skype?

    Well I gtg for the night it'll be done tomorrow.

    Ok download link is <Edit by Moderator: Redacted mediafire url>
    I haven't gotten permissions added yet and no messages pop up this is just a basic version were no one can place beds.

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

    DomovoiButler

    @iidunno , wow...tomjw64 already take this over and you take it over too?i dont know how to say it but dude, but your mean...next time, dont just act right away, you make the other coders/developers feel bad cause they are trying hard to make plugins too...you just dont take it away from them
     
    Monopol likes this.
  7. Offline

    tomjw64

    Here is my copy.
    If it is working like it should, then it should have everything you wanted. It cancels an EnterBed event and gives them a warning unless they have the NoSleep.sleep permission.
    Tell me how it works if you can!
    <Edit by Moderator: Redacted mediafire url>
    Note: I haven't been able to test it completely because I don't have a powerful computer at the moment that can handle both a client and server :p (I will tomorrow). This means it may not work or have a bug or two. I did however run a temp bukkit server on my current computer and I got no error messages.
     
    Last edited by a moderator: Nov 12, 2016
  8. Offline

    iidunno

    I'm only providing the basics if tom wants I'll post the source and he can build on top of it. And if you want I'll show you a link of this happening to me.

    Also your a better coder then me, I don't know how to add permissions yet.

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

    tomjw64

    Well, I just started making bukkit plugins today, so thanks! That means a lot! :D
    If you could test my version out I would appreciate it though, because I still don't know if it works!

    And @DomovoiButler, I'm sure he meant no harm :p

    Ok, so I tested this on my minecraft server. From what the players said, it blocks players from sleeping like it should, however, I seem to have messed up the permissions somehow, as OPs can't even sleep xD I will fix this in at least the next couple days. Maybe I will make a bukkitdev for this too :p

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

    moose517

    real simple fix, all you need to do is in your plugin.yml file add the following
    Code:java
    1.  
    2. permissions:
    3. NoSleep.sleep:
    4. description: whatever you want it to be
    5.  
     
  11. Offline

    tomjw64

    I'm going to learn a little more about permissions really quick and release a working version tomorrow!

    oh really! thanks! should this go in a specific spot or does it not matter?

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

    moose517

    anywhere in the file
     
  13. Offline

    544nick101

    Cool... when bukkit recommended build comes out i will test these :D
     
  14. Offline

    iidunno

    Lol I did also!
     
  15. Offline

    tomjw64

    ok guys! I finally got it working thanks to moose517's fix! Thanks moose517! :)
    Everything works perfectly in this version, even permissions!
    Glad I could be of service and that my first plugin was a success! :D
    <Edit by Moderator: Redacted mediafire url>
     
    Last edited by a moderator: Nov 12, 2016
  16. Offline

    iidunno

  17. Offline

    544nick101

     
    Last edited by a moderator: Nov 12, 2016
  18. Offline

    tomjw64

  19. Offline

    544nick101

  20. Offline

    tomjw64

    I give credit where it's due :D
     

Share This Page