Spigot BetterSleeping 3.0.6

Makes sleeping in multiplayer useful and fun!

  1. vallas submitted a new resource:

    BetterSleeping - Improves sleeping on servers and it is fully customisable!

    Read more about this resource...
  2. vallas updated BetterSleeping with a new update entry:

    Update 1.1

    Read the rest of this update entry...
  3. vallas updated BetterSleeping [1.12 - 1.13] with a new update entry:

    Update 1.2

    Read the rest of this update entry...
  4. When players sleep, it seems to change the time in all of my worlds, not just the one that players were sleeping in. How can I fix this?
  5. I'm sorry that I'm just seeing this now. Currently the plugin always changes the time in every world, there is nothing you can do about that. However, I am willing to add an option that allows world specific behavior to solve your problem. I'd need a week tops, is that alright with you?
  6. No problem, I can wait
    • Like Like x 1
  7. Alright, I added the feature along with a few smaller improvements. I'm not 100% sure that it's completely error free since I had to do all testing by myself this time. I would like to ask you a favor though, could you test the newest version of BetterSleeping? With testing, I mean just using the plugin as you normally would and see if it works. The newest update can be downloaded from GitHub, at this page [click]. Obviously version 1.3 is the one with the new features. The multiworld behavior might not even work at all and I don't want to officially release a malfunctioning plugin. If you don't want to do testing, or don't trust a download on another site, that's fine. I would totally understand!
    Anyway, these are the patch notes:
    • CONFIG.YML WILL BE RESET (unless 'world_specific_behavior' is manually added to config.yml prior to updating the plugin, note that a boolean must be provided as well: true or false)
    • Multiworld option, allows nights/storms to be skipped in only one specific world when a custom percentage of the players in that same world are sleeping. By default, this is set to false since that was the orignal behavior)
    • More custom messages: From now on a message will apear when enough people are sleeping, when the night/storm is skipped and when the 'fast forwarding' is cancelled. Prior to this update there only was a message when the night was skipped. In order to customise these messages, they should be added manually to lang.yml or lang.yml should be deleted to regenerate all default values (with some handy comments)
    • A yellow warning will be sent to the console when lang.yml is missing option(s) from now on, reminding the admin to add them manually
    • The console will kindly remind admins that it is greatly appreciated when the prefix contains 'BetterSleeping', but only when they are not using 'BetterSleeping' in the prefix. (This won't be enforced in any way, only encouraged)
    • Default values are now mentioned in comments in config.yml
  8. Yeah I’ll be able to test it tomorrow, thanks for pushing the update.
    • Friendly Friendly x 1
  9. That's amazing! Thank you as well.
  10. Installed BS version 1.3 and did some basic testing, the new world functionality seems to be working great!
    • Winner Winner x 1
  11. Thank you so much! That's great to hear!
  12. vallas updated BetterSleeping [1.12 - 1.13] with a new update entry:

    Update 1.3

    Read the rest of this update entry...
  13. Hello.

    Is it possible to add an option to disable messages in the configuration?

    enough_sleeping: "none"
    good_morning: none
    canceled: "none"

    Players in the afternoon spamming chat messages trying to sleep.
  14. I've thought about that feature, but currently that is not yet possible. I will look into it as soon as possible, shouldn't be too much work. I'll add it this evening (±12 hours from now) or tomorrow evening. Thank you for your suggestion!
  15. vallas updated BetterSleeping [1.12 - 1.13] with a new update entry:

    Update 1.3.1

    Read the rest of this update entry...
  16. Alright, I implemented your suggested feature. Thank you for giving me feedback!
    • Like Like x 1
  17. Hi with me this error comes as soon as someone puts to bed.
    and he writes the version betterSleeping v1.4.
    [07:39:10] [Server thread/ERROR]: Could not pass event PlayerBedEnterEvent to betterSleeping v1.4
    org.bukkit.event.EventException: null
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:308) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:500) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:485) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at org.bukkit.craftbukkit.v1_13_R2.event.CraftEventFactory.callPlayerBedEnterEvent(CraftEventFactory.java:130) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.EntityHuman.a(EntityHuman.java:1289) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.EntityPlayer.a(EntityPlayer.java:695) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.BlockBed.interact(BlockBed.java:49) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.IBlockData.interact(SourceFile:281) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.PlayerInteractManager.a(PlayerInteractManager.java:497) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.PlayerConnection.a(PlayerConnection.java:1244) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.PacketPlayInUseItem.a(PacketPlayInUseItem.java:37) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.PacketPlayInUseItem.a(PacketPlayInUseItem.java:1) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.PlayerConnectionUtils.a(SourceFile:10) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_191]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_191]
    at net.minecraft.server.v1_13_R2.SystemUtils.a(SourceFile:199) [spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.MinecraftServer.b(MinecraftServer.java:900) [spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.DedicatedServer.b(DedicatedServer.java:417) [spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.MinecraftServer.a(MinecraftServer.java:835) [spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at net.minecraft.server.v1_13_R2.MinecraftServer.run(MinecraftServer.java:733) [spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_191]
    Caused by: java.lang.NullPointerException
    at be.dezijwegel.events.OnSleepEventLocal.onPlayerEnterBed(OnSleepEventLocal.java:46) ~[?:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_191]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_191]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_191]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_191]
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:304) ~[spigot-1.13.2.jar:git-Spigot-9b4b0a2-f489f0f]
    ... 21 more
  18. Thank you for your report, I have been trying to get this error (in Spigot 1.13.2 like you are using) but I didn't succeed. However, something must be wrong with the plugin for you to get this error. The version mistake is another error on my part, I changed my mind about the version last minute so that's why it says 1.3.1 on Spigot and 1.4 in the console, I am sorry for the confusion. Could you send me the contents of your config.yml? This would help me track the error down.

  19. # ################ #
    # BetterSleeping #
    # ################ #

    # If the explanation in this file is not clear enough, please check BetterSleeping's Spigot page
    # I like hearing your opinions! Let me know in the plugin's discussion section or via a review!
    # If you have any requests, let me know and I'll look into them whenever I can.

    # Set the percentage of online players that need to be sleeping
    # in order to skip the night/storm.
    # Default: 30
    percentage_needed: 30

    # Set the time (in ticks) that players will have to remain in their beds
    # as soon as enough people are sleeping.
    # A delay of one second is equal to 20 ticks so setting this to 40 means a delay of two seconds
    # Default: 40
    sleep_delay: 40

    # Choose whether BetterSleeping should treat every world seperate from eachother (true)
    # percentage_needed: 30 would mean that 30% of all players IN WORLD X should be sleeping
    # If this condition is met, the night/storm will ONLY be skipped in that same world
    # Example: There are 100 online players, 90 in the End and 10 in the Overworld.
    # 3 people are sleeping in the Overworld and since 30% of people in that world are sleeping
    # The night will be skipped, but ONLY in the Overworld
    # Or if it should count the global number of sleeping players and skip the night/storm in all worlds (false)
    # percentage_needed: 30 would mean that 30% of all ONLINE players should be sleeping
    # If this condition is met, the night/storm will be skipped in EVERY world
    # Example: There are 100 online players, 90 in the End and 10 in the Overworld.
    # 30 people (of all worlds combined) must be sleeping in order to skip the night/storm.
    # The night/storm will be skipped in EVERY world!!
    # Default: false
    world_specific_behavior: true
    • Like Like x 1
  20. BetterSleeping activates and resets world time to morning whenever a bed is clicked (provided enough % of people are sleeping), regardless of whether it's actually night. This means people can just spam beds and reset the time as often as they want, which also clogs chat very quickly.