RealSleep

Warning: This project is experimental. Its files will not synchronize across the CurseForge network.

Banner

Are you an owner of an RPG server? Or do you want to make your players go to sleep in a more natural and independent way? Here is a fix! RealSleep introduces sleep levels. When you get too sleepy, you start getting the confusion effect. You can do /sleep restore (admins only) or sleep in a bed and wake up to refresh yourself.

Features

  • Perfomance-wise!
  • Check on others' sleep!
  • Restore players' sleep though admin commands!
  • It. Just. Works.

Commands

  • /sleep Base of all commands.
  • /sleep help See command help.
  • /sleep check See your sleep level.
  • /sleep check <Player name> See others' sleep level
  • /sleep restore <Player name> Restore a person's sleep level.

Permissions

  • RealSleep.false Never get sleepy. (False)
  • RealSleep.check Check own sleep. (True)
  • RealSleep.checkOthers Check others' sleep (Op)
  • RealSleep.restore Restore sleep (Op)

To-do

  • Spout GUI
  • Fix bed bug (No pun intended :D )
  • Configuration
  • Sprinting uses more sleep
  • Economy support for restoring sleep
  • Multi-world

FAQ

Do reloads affect the data?

No, it won't. Data is saved immediately into a file, so reloads won't corrupt it. :)

What if others won't sleep?

They won't affect you. As long as you are in bed (even not sleeping), the time is counted and will be applied.

Hey, when I am in bed, why don't my sleep increase?

The sleep is counted, but for the sake of performance, the sleep will only be saved when you leave your bed.

Will players be able to abuse this by entering and leaving the bed immediately?

Nope. The 'refreshment' is counted in time, so entering and leaving will just apply no effect at all.

This also has a good side effect of realism, in which people will not be able to just go to sleep at 5AM with a zero sleep level expecting to be completely refreshed for the next day. If you are tired, you need more sleep! :)

Thank you for using this plugin! You are awesome! So here is the source code!

Source code

Extra Credits

izak12345678910 Idea :D
tomcat98 SLAPI


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Recent Files

Bukkit