Harbor - A Sleep Enhancement Plugin! 1.4.4

Harbor is a plugin that redefines sleep within your Spigot server!

  1. TechToolbox
    Native Minecraft Version:
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    Source Code:
    Ahoy, matey! Harbor is a Spigot plugin that redefines how sleep works in your server, making it easier for all the online players to get in bed quick and skip through the night!


    NOTE: When updating to version 1.4, your previous configuration files WILL NOT work.
    Harbor is designed to encourage players to sleep! It works best when installed in a survival SMP, making it easier for players to skip the night and prevent Phantom attacks! Oh, it also does these things:

    - The night can be skipped if a percentage of players are sleeping (customizable percentage in configuration)
    - A counter of currently sleeping players is displayed to encourage other players to sleep.
    - Players are notified in the chat or action bar if someone is sleeping.
    - Players with the "harbor.bypass" permission can be excluded from the sleep count.
    - Sleep can be completely disabled and players won't be able to enter any bed.

    NOTE: The video only covers features that were available in version 1.0 of the plugin, so there's way more available now!

    I believe that all plugins should be totally configurable, and as such, every part of this plugin can be modified in the configuration file! Every message is customizable and has full support for unicode and color codes.

    Code (YAML):
    #                   _              
    #   /\  /\__ _ _ __| |__   ___  _ __
    #  / /_/ / _` | '__| '_ \ / _ \| '__|
    # / __  / (_| | |  | |_) | (_) | |  
    # \/ /_/ \__,_|_|  |_.__/ \___/|_|  
    # An open-source project by TechToolbox
    # https://techtoolbox.tk/
    # Ahoy, matey! You've arrived at the configuration file, where things get scary.
    # Every single thing within this plugin is customizable (at least I tried to make it that way),
    # so every message and plugin module can be modified here. If you would like to report a bug
    # or suggest a feature, make sure to add an issue on the GitHub page for this plugin!
    # GitHub URL: https://github.com/nkomarn/Harbor/issues

     # How often (in seconds) to check if a player is in a bed (increase for slower servers)
    : 1
      # Percent of players that need to sleep to skip night (must be 0.0 to 1.0)
    : 0.5

     # Toggle night skipping feature. Configure amount of players needed to skip above (percent)
    : true
      # Clear weather when skipping night
    : true
      # Display debug information in console
    : false

       # Toggle chat messages
    : true
        # "Night skipped" chat message
    : "&eThe night has been skipped."
        # Display which player went to bed in chat
    : "&e[player] is now sleeping ([sleeping]/[online]. [needed] more needed to skip)."
        # Sent to player when they sleep with "harbor.bypass" permission
    : "&eYou've been excluded from the sleep count."
       # Enable/Disable actionbar message
    : true
        # Shown when some players are in bed
    : "&e[sleeping] out of [online] players are sleeping ([needed] more needed to skip)."
        # Shown when all players are in bed
    : "&eEveryone is sleeping. Sweet dreams!"
       # Prefix for Harbor command messages
    : "&8&l(&6&lHarbor&8&l) "
        # Display server version in console
    : "&7Running on version [version]."
        # Sent in console when the plugin isn't compatible with the server
    : "&7Spigot version [version] isn't compatible with Harbor."
        # Harbor reload message
    : "&7Reloaded Harbor"
    : "&7Error reloading Harbor."
        # Sent when player doesn't have permissions to run command
    : "&7Insufficient permissions."

    # Version identifier (do not change)
    : 1.4.4
    [FONT=Courier New][SIZE=5]

    I am constantly thinking of ways to improve Harbor. As such, updates are usually pretty feature packed, so here's an extensive change log of all the things I've added, changed, or removed from Harbor:

    Version 1.4.4
    - Fixed the OP/permission bypass feature!
    - Added a feature that allows you to disable sleeping completely (pretty sure it only works on 1.13.2 right now)

    Version 1.4.3
    - Fixed a Null Pointer Exception when operators would try to sleep!

    Version 1.4.2
    - Added support for 1.13.2
    - Removed the configuration version check as it was totally broken and rather useless

    Version 1.4
    - Recoded and optimized the whole plugin!
    - Added multi world support!
    - Fixed player bypass, now fully excluding players with permission "harbor.bypass" from counts of all types!
    - Made it so that weather clears when night is skipped!
    - Added a lot more messages to the configuration.
    - Literally remade the WHOLE configuration!
    - Added a command allowing for reloading the configuration ("/harbor reload")!
    - Implemented a debug option that prints extra messages to console for debugging purposes.
    - Added an action bar placeholder that displays the amount of players that are needed for the night to skip.
    - Added a feature that knocks players out of bed to prevent plugin glitches.
    - Added configuration version checking (old configurations will be incompatible)
    - Fixed the negative player count issue
    - Fixed some minor math bugs to make the plugin round better.

    Version 1.3.2
    - Added permission "harbor.bypass" which will allow players with it to skip the night!
    - Made it so that putting the messages as blank in config won't print blank lines in chat.

    Version 1.3.1
    - Prevented night skipping if only one player is online.
    - Fixed night skipping on server versions 1.12.2 and below (night would skip no matter what even if one player got into bed)

    Version 1.3
    - You can now change the amount of players that need to be sleeping to skip the night!
    - Fixed the action bar player counter (previously would get stuck at 1 player).

    Version 1.2
    - Harbor now supports all versions from 1.8 to 1.13.1!
    - The default sleeping check time has been lowered to 1 seconds in the config.
    - Fixed a bug where the amount of players sleeping would go below zero if the server was reloaded while players were in bed.

    Version 1.1
    - The night can now be skipped if more than half of the online players are sleeping.
    - Added optional chat messages (same as actionbar ones).
    - Added a chat message that displays which player went to bed.
    - The interval at which the plugin checks for players in bed can now be changed (can be set higher for weaker servers).
    - Added more toggles and messages to configuration.
    - Fixed bug where action bar messages would not show for a while after reloading the server.

    Version 1.0
    - When players enter a bed, a message is shown in the actionbar to inform other players that it is time to sleep.

    dak47922 and FPK35 like this.

Recent Updates

  1. OP bypass fix!
  2. A Hotfix for an.. erm... Hotfix?
  3. Hotfix for 1.13.2!

Recent Reviews

  1. dak47922
    Version: 1.4.4
    Got referred to this plugin by my members, cant wait for the update! Looks awesome!
  2. Camillo82
    Version: 1.4.4
    Excellent plugin! Can you please update to 1.14 or 1.14.1? It's not working on 1.14 - it is using AgarthaLib which is not supported anymore.
    1. TechToolbox
      Author's Response
      I am in the process of testing the latest update (which will be compatible with 1.14) to make sure it's bug free! I will be releasing it as soon as I can! Also, Harbor doesn't use AgarthaLib or any external libraries, rather has it's own. Either way, thank you for the review!
  3. InTheVan
    Version: 1.4.4
    Good plugin! Just what I was looking for, requires 1 more person to sleep after it says 0 more required, so I'm unsure as to why that occurs.
    1. TechToolbox
      Author's Response
      That is an issue with the how I coded the math in this version of the plugin. I have fixed that in the latest version that I am currently finishing up- I'll release the fixed version this Friday (hopefully). Either way, thank you for the review!
  4. VinceNL
    Version: 1.4.4
    It's great and worked fine for a long time, however yesterday i added a new world (with seperate time) and now it sometimes spams the console with errors.
  5. hornta
    Version: 1.4.4
    Does not update the sleep counter sometimes when people are leaving the server.
    Also makes a damaging sound and animation for every player everytime i reload the plugin with /harbor reload
    1. TechToolbox
      Author's Response
      I have fixed all of these issues for release 1.5, which will be coming out fairly soon! Just have to do some more testing on it to make sure it's all good and stable. Either way, thanks for the review ;)
  6. SheepSaysBaah
    Version: 1.4.4
    Great plugin, but it feels like a must to be able to exclude AFK players, that would be great!
    1. TechToolbox
      Author's Response
      The ability to ignore players is coming in release 1.5 (hoping to release it later this week). Either way, thanks for the review :)
  7. AcidicChip
    Version: 1.4.4
    Great plugin! Sleep is not working during thunder storms though. It'll say "0 players needed of...", but not pass the storm.
  8. Fauxhawk18
    Version: 1.4.4
    Does exactly what we wanted, takes away the need for everyone on the server to sleep, and that's what I was looking for.
  9. Brambosss
    Version: 1.4.3
    Excellent plugin!
    However, would it be possible to add an option to exclude afk players from the total amount of players?
    1. TechToolbox
      Author's Response
      That's actually on my list of plans for the plugin! :)
  10. Simongravvold
    Version: 1.4.3
    Great plugin. But it's send every message in console. Soo that plugin is a consolspammer DELUX!!!!
    1. TechToolbox
      Author's Response
      Haha, great review. Currently working on fixing the console spam :)