This thread will no longer be updated. See the page on the Sponge Ore Repository instead.
Nice!
Will this be similar to this one?
https://www.spigotmc.org/resources/better-beds.1824/
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!
New version released! v0.4.0
Changelog
- 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
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
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!
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!