SinglePlayerSleep 1.13_2.13.46

Allows one person to sleep, without others on server having to sleep or log.

  1. JoelYahwehOfWar
    Tested Minecraft Versions:
    • 1.12
    • 1.13
    • 1.14
    • 1.15
    • 1.16
    • 1.17
    Source Code:
    https://github.com/JoelGodOfwar/SinglePlayerSleep
    Languages Supported:
    English (en_US), Français (fr_FR), Deutsche (de_DE), Nederlands (nl_NL), 中文 (zh_CN), čeština (cs-CZ), Portuguese (pt_BR), LoL Cat (lol_US), русский (ru_RU), Türk (tr_TR), svenska (sv_SV), Polskie (pl_PL)
    Because I can't access my old account I had to start this one. I will be updating the plugin for all the versions of minecraft that have come out while I've been gone.
    For versions of minecraft older than 1.12 please download the version specific to yours from https://www.spigotmc.org/resources/single-player-sleep.20173/

    Version checker update will come for each version as updates require them. So that outdated versions will not say there is an update when the update is incompatible with the older version of MC.

    Introduction:
    First Off, I watch several Hermitcrafters, and after seeing them have issues with their Single Player Sleep command block, rain messes it up. I decided to make this simple plugin.

    Product Description:
    When a player right clicks on a bed, the plugin broadcasts "<player> is sleeping [CANCEL]", if no one clicks on Cancel, then after 10 seconds the plugin will advance the time ahead to the next morning. Thus the day and difficulty is not affected. The plugin also checks for storms, and if the player has the permissions, it will clear them. There is also a permission for the Cancel command.
    New feature starting 2.13.31, DaySkipper: A player with a Black bed, and the sps.dayskipper permission may skip the day to night, also can require an item named DaySkipper in config.yml.
    New feature starting 2.13.43, support for nicknames from VentureChat and Essentials, also includes RGB support for those nicknames.

    New feature starting 2.13.44, colors in sleepmsgs. See new config.yml for details, may have to pull from jar.
    [​IMG]

    Sleepmsg examples:
    Code (Text):
    # Color codes are now usable in sleepmsgs, Example: <BLACK>Black<RESET>Reset
    # RGB format is §xFF00FF (§xFFFFFF<player> §x000000i§x999999s §x111111s§x888888l§x222222e§x777777e§x333333p§x666666i§x444444n§x555555g)
    # THERE MUST BE A COLOR CODE IN FRONT
    sleepmsg1: §xFFFFFF<player> §xFF0000is §xFF7F00s§xFFFF00l§x00FF00ee§x0000FFpi§x4b0082n§x9400D3g
    sleepmsg2: §xFFFFFF<player> §x00FFFFwent to bed. Sweet Dreams
    sleepmsg3: <YELLOW>Shhh! §xFFFFFF<player> §xFF0000is §xFF00FFtrying §x0000FFto §x00FF00sleep!
    sleepmsg4: §xFFFFFF<player> §xFF00FFis asleep at the wheel
    sleepmsg5: §xFFFFFFNO ONE<colon> ...\n§xFFFFFF<player><colon> §xFFFF00go to bed.

    Languages supported:
    # Available languages English (en_US), Spanish (es_MX), Français (fr_FR), Deutsche (de_DE), Nederlands (nl_NL), 中文 (zh_CN), čeština (cs-CZ), Portuguese (pt_BR), LoL Cat (lol_US), русский (ru_RU) , Türk (tr_TR) translation by "FurkanSB - TurkGamerZ", svenska (sv_SV) by Ludde, Polskie (pl_PL) by Fluffi

    Known conflicts:
    I was made aware that Essentials's permission "essentials.sleepingignored" conflicts with SPS.

    [​IMG]

    [​IMG]
    Permissions:
    Code (Text):
    permissions:
      sps.hermits:
        description: Allows one player to change the time to day when using a bed. Without clearing local difficulty.
        default: true
      sps.unrestricted:
        description: Allows the player to sleep uninterrupted. Other players will not be able to cancel it.
        default: false
      sps.downfall:
        description: Clears Downfall upon SPS sleep.
        default: false
      sps.thunder:
        description: Clears Thunderstorm upon SPS sleep
        default: false
      sps.cancel:
        description: Allows canceling Single Player Sleep.
        default: true
      sps.command:
        description: Allows player to use the /sleep command, instead of a bed.
        default: op
      sps.update:
        description: Allows the player to check for updates.
        default: op
      sps.op:
        description: Overrides all permissions.
        default: false
      sps.showUpdateAvailable:
        description: Shows player that there is a version update.
        default: op
      sps.dayskipper:
        description: Allows one player to change the time to night when using a bed. Without clearing local difficulty.
        default: false
      sps.dayskipcommand:
        sps.command:
        description: Allows player to use the /dayskip command, instead of a bed.
        default: op

    If the player is the only player online, then the bed functions as normal, since the sleep function works before the 10 second delay.

    config.yml:
    Code (YAML):
    # DO NOT CHANGE VERSION
    version
    : 1.0.5

    # Change to false to stop auto-update-check.
    auto_update_check
    : true

    # Set to true before sending a log about an issue.
    # Logs trace data required to pinpoint where errors are.
    debug
    : false

    # Set the language to use, en_US, nl_NL, lol_US, fr_FR, de_DE, zh_CN, cs-CZ, pt_BR
    lang
    : en_US

    # Set Blacklist worlds, Names are Case Sensitive, World does not equal world
    blacklist
    :
      sleep
    : world_nether, world_the_end
      dayskip
    : world_nether, world_the_end
     
    # Should broadcasts be per world, or server wide? (Should be true for multiverse)
    broadcast_per_world
    : true

    # Enables fancy ANSI colors in console.
    colorful_console
    : true

    # Set whether to allow player to stop rain when it is not night.
    clearrain_enabled
    : false

    # If true this will disable all broadcast messages and allow anyone to sleep.
    unrestrictedsleep
    : false

    # Set wake time, Early (23000) or Normal (24000)
    waketime
    : NORMAL

    # Delay between sleep, and change to day, in seconds. Minimum 1, recommend 10.
    sleepdelay
    : 10

    # Enable(true) or Disable(false) dayskipper
    enabledayskipper
    : false
    # Delay between request for DaySkip, and change to night, in seconds. Minimum 1, recommend 10.
    dayskipdelay
    : 10
    # If true this will disable ability of players to cancel DaySkipper
    unrestricteddayskipper
    : false
    # Require DaySkipper item
    dayskipperitemrequired
    : true

    # Set the color of the [CANCEL] link text in broadcast messages. Format RED
    # Colors: AQUA, BLACK, GOLD, GRAY, BLUE, GREEN, RED, YELLOW, WHITE
    # DARK_AQUA, DARK_BLUE, DARK_GRAY, DARK_GREEN, DARK_RED, DARK_PURPLE, LIGHT_PURPLE
    # MAGIC, BOLD, STRIKETHROUGH, UNDERLINE, ITALIC, RESET
    cancelcolor
    : RED
    cancelbracketcolor
    : YELLOW
    # Sleep message color, see above
    sleepmsgcolor
    : WHITE
    # Player name color, see above
    playernamecolor
    : WHITE

    # Set to true to have SPS cancel sleep if the player exits their bed.
    exitbedcancel
    : false
    # Set if cancel is shown or not.
    display_cancel
    : true
    # Set to true to broadcast "<player> canceled sleep."
    # Set to false not to broadcast that message.
    cancelbroadcast
    : true

    # Set the time limit in seconds which a player must wait between attempting to sleep again.
    # This prevents a user from spamming chat with sleep messages.
    # Set to 0 to disable.
    sleeplimit
    : 60
    # Set the time limit in seconds which a player must wait between attempting to cancel again.
    # This prevents a user from spamming chat with cancel messages.
    # Set to 0 to disable.
    cancellimit
    : 60


    # Set whether the player should be told it must be night to use.
    notifymustbenight
    : false

    # Set to true to use random sleep msgs.
    randomsleepmsgs
    : true

    # Set to the number of sleep msgs
    numberofsleepmsgs
    : 5
    # Set msgs for random sleep msgs here "sleepmsg#: <player> msg here"
    # Don't forget the space between : and the start of the message.
    # Color codes are now usable in sleepmsgs, Example: <BLACK>Black<RESET>Reset
    # RGB format is §xFF00FF (§xFFFFFF<player> §x000000i§x999999s §x111111s§x888888l§x222222e§x777777e§x333333p§x666666i§x444444n§x555555g)
    # THERE MUST BE A COLOR CODE IN FRONT
    sleepmsg1
    : §xFFFFFF<player> §xFF0000is §xFF7F00s§xFFFF00l§x00FF00ee§x0000FFpi§x4b0082n§x9400D3g
    sleepmsg2
    : §xFFFFFF<player> §x00FFFFwent to bed. Sweet Dreams
    sleepmsg3
    : <YELLOW>Shhh! §xFFFFFF<player> §xFF0000is §xFF00FFtrying §x0000FFto §x00FF00sleep!
    sleepmsg4
    : §xFFFFFF<player> §xFF00FFis asleep at the wheel
    sleepmsg5
    : §xFFFFFFNO ONE<colon> ...\n§xFFFFFF<player><colon> §xFFFF00go to bed.

    Commands:
    Code (Text):
    /sps            - shows help
    /sps reload     - reloads configs.
    /sps update     - checks for updates.
    /sleep          - command to sleep instead of using bed, requires permission.
    /spscancel      - cancels sleep, or dayskip, if either is scheduled.
    /dayskip        - command to dayskip instead of using bed, requires permission.

    [​IMG]

    For help you can post issues and suggest ideas on my discord server.
    [​IMG]

    License:
    MIT License

    This plugin utilizes bStats to collect anonymous statistics
    [​IMG]

    Contributing:
    This plugin is open source; you can view the source code on github. Feel free to open issues there or submit pull requests.

    If you like this, check out my other plugins,
    [​IMG] SinglePlayerSleep, [​IMG] NoEndermanGrief,[​IMG] PortalHelper,
    [​IMG] DragonDropElytra, [​IMG] ShulkerRespawner, [​IMG] MoreMobHeads,
    [​IMG] SilenceMobs, [​IMG]VillagerWorkstationHighlights, [​IMG] RotationalWrench.
    zenkake likes this.

Recent Reviews

  1. Teals53
    Teals53
    5/5,
    Version: 1.13_2.13.46
    i do the settings u say to true but now when i cancel sleep its have fp with ncp

    [21:11:47 INFO]: [NC+] Teals53 failed BedLeave: tried to send fake bed leave packets (was not in/near a bed) (VL2)
    [21:11:47 INFO]: Teals53 lost connection: (!) Invalid bed-leave packets.

    like that
  2. Wowkster
    Wowkster
    5/5,
    Version: 1.13_2.13.45.2
    Excellent Plugin! This plugin works exactly as intended and is a perfect solution to the multiplayer sleeping problem. Highly customizable and very clean. No complaints.
  3. ImDaBigBoss
    ImDaBigBoss
    5/5,
    Version: 1.13_2.13.45.2
    Perfect! Extremely useful, even with the new gamerule for sleeping percentage in 1.17
  4. ElTodoFull
    ElTodoFull
    5/5,
    Version: 1.13_2.13.42
    Great for survival servers when there is a lot of people playing at the same time.
  5. Ferotiq
    Ferotiq
    5/5,
    Version: 1.13_2.13.40
    This plugin works excellent, I'm just going to comment on the warning about the EssentialsX Permission. For me, when it is either on or off, the sleep delay is always 0. Do you know any fix for this or is it just not compatible with EssentialsX?
    1. JoelYahwehOfWar
      Author's Response
      Sorry about the late response, the Essentials permission must be off for all players, if even one has it, SPS will not work. This is due to EssentialsX, and not SPS.
  6. TianShuo
    TianShuo
    5/5,
    Version: 1.13_2.13.37
    Hello, your plugin is very practical. Can I move the plugin to www.mcbbs.net

    There are many fans of China and minecraft. I believe your plugin will be popular.
    1. JoelYahwehOfWar
      Author's Response
      Well since I can't read Chinese to do the Captcha go for it. I still have no idea what the captcha wanted me to do.
  7. IsHarilloX
    IsHarilloX
    5/5,
    Version: 1.13_2.13.36
    Good plugin. It would be great if you could configure in some way the number of users that must be sleeping so that it can be done, he said, Example: That 50% of connected users are asleep so that it can be done during the day.
  8. AstetYne
    AstetYne
    5/5,
    Version: 1.13_2.13.35
    Good plugin. But when player can't go sleep because of nearby monsters, it will count as he went sleeping.
  9. Entri
    Entri
    5/5,
    Version: 2.13.32
    This plugin is good but when you press on the bed on day the time resets to night so you can sleep, please fix this bug.
    1. JoelYahwehOfWar
      Author's Response
      Would you mind sending me the config.yml from the server you are using? And a server log of the activity, and the username. You can do that through spigotmc, or the SPS github issue tracker.
  10. H8RMinecraft
    H8RMinecraft
    5/5,
    Version: 2.13.32
    Can't recommend this plugin enough. The support and activity of the developer is second to none.
    This is one of those occasions where 6 stars are required, especially now he includes Discord support.