Sleep Vote (See Ore)

This thread will no longer be updated. See the page on the Sponge Ore Repository instead.



Will this be similar to this one?

I like it, great idea !

Yes, it is similar to it, albeit with less features.
Now that you’ve linked me to it, I’ll try to add some of those features in! :smiley:

1 Like

New version released! v0.4.0

  • Fixed a bug where a player could trigger a sleep vote despite not being in range of a bed
  • Fixed a bug where the vanilla sleeping mechanic overrides the plugin’s, preventing the displaying of the wakeup message and instead displays the exit_bed message for all players currently sleeping
  • Moved configuration file to /config/sleepvote/sleepvote.conf
  • Added more configurable messages
  • Optional chat prefix “[SleepVote]” for SleepVote messages
  • Option to log all voting status messages to the console (e.g. “[world] Player has went to bed! 1/100 (1%)”)
  • Added 4 second delay to the initiation of the player’s vote after they right-click a bed (to give the animation a bit of time)
  • Added a reload command (‘/sleepvote reload’) to reload the plugin’s configuration without needing to restart the server. - Also works with ‘/sponge reload’

Made for Sponge API 5.1.0 and Minecraft 1.10.2

1 Like

I’ve been busy lately due to school.
But, I’m hoping to be able to get version 0.5.0 out by the end of the next month!
Some features include:

  • Nucleus integration for detecting (and optionally ignoring) AFK players
  • A new ‘hideme’ command to hide yourself from the plugin
  • Smooth/animated time transitions! No longer being added due to practicality reasons and issues with night-sleep time coherence.

Maybe you could add a permission to bypass. Like an admin logged and vanished would have the sleepvote.bypass and would not be counted in the required percentage.

The problem with detecting vanished players is that I’m not sure of a way to do it.
Nucleus is the only plugin (as far as I know) that has the ‘vanish’ functionality, but its API does not appear to have any way of letting other plugins see which player is vanished and which is not.

So for now, I’ve added a ‘/sleepvote hideme’ command to workaround that.
If an admin wants to be completely hidden, they would execute ‘/vanish’ and then ‘/sv hideme’ or ‘/sleepvote hideme’ right afterwards.

Detecting when a player executes the command ‘/vanish’ won’t be a good alternative.
I would need some fool-proof way of knowing for sure if the player is vanished or not.
Otherwise a problem may occur in which Nucleus thinks that the player isn’t vanished while my plugin thinks that the player is vanished, or vice versa. This could happen in a number of ways.

Vanishing was not the main idea. In fact, any player with node sleepvote.bypass should not be included in the percentage :slight_smile:

This way, it doesn’t require admin to type /sleepvote hideme when players want to sleep.

The ‘hideme’ command will persist on relogs and server restarts, so having a separate permission that offers the same functionality is a bit redundant. But, you just gave me a great idea on how to better implement it!

1 Like

A new version has been released! v0.5.0

  • Added sounds that play on the wakeup, enter and exit bed messages
  • Added two new commands: ‘sleepvote hide’ and ‘sleepvote mute’
  • The ‘sleepvote hide’ command toggles whether a player is hidden from the plugin. The same effect can be accomplished by giving/taking away the permission ‘sleepvote.hidden’
  • The ‘sleepvote mute’ command toggles whether a player will hear sounds played by the plugin. The same effect can be accomplished by giving/taking away the permission ‘sleepvote.mute’
  • Added a configuration option to completely disable/enable sounds
  • Added configuration options to ignore players with certain game modes
  • Added Nucleus integration for the ability to ignore AFK players

Built for Sponge API 5.1.0 and Minecraft 1.10.2. It is forward compatible with Sponge 6.0.0 and Minecraft 1.11.2.

A new version has been released! v0.5.1

  • Allows the use of 0.0 percent for the variable “required_percent_sleeping”, in which case it will use a minimum requirement of 1 player sleeping

Built for Sponge API 5.1.0 and Minecraft 1.10.2
Forward compatible with Sponge API 6.0.0 and Minecraft 1.11.2

A new version has been released for Sleep Vote, it is available for download here.

  • Fixed a bug in which the configuration file was not created on the first startup

Made for Sponge API 5.1.0 and Minecraft 1.10.2
Forward compatible with Sponge API 6.0.0 and Minecraft 1.11.2

Hey Icohedron,

Thanks for the great plug-in! I’m currently having an issue where as an op I am hidden from sleepvote by default and I can’t find a way to change it. If I sleep in a bed, nothing happens, but if I /sleepvote hide it tells me I am no longer hidden and then it works. The next time I sleep I am hidden again. Am I missing something in the config file so that I can set it to unhidden by default?

The status of being hidden is determined by the permission ‘sleepvote.hidden’. Since ops, by definition, have all permissions, they therefore also have this permission which hides them from the plugin.

The only way to work around this is to use a permissions plugin (I personally recommend LuckPerms but any permissions plugin should work). After setting up a permissions plugin, the next time you execute the ‘/sleepvote hide’ command it should continue to persist.
The command is just another way of enabling/disabling the ‘sleepvote.hidden’ for yourself, no matter which permissions plugin you use.

Awesome! I’m pretty new to plug-ins as I jumped into modded servers in 1.7 when bukkit died.Thanks for the tip!