Server Sleeping Mechanics


It was suggested earlier this week to me that the day and night cycles should be increased. I think it would be a good idea. That way, for newer players, it gives them more time to get setup for the night and longer time for older players to work on projects without constantly worrying if a mob is going to attack. I am constantly hearing from players to sleep in beds because they didn’t have enough time to finish what they were doing before darkness fell.

The time can be debated but I believe a 20m day and a 15m night would be adequate as days are (on average) longer than night. That way, players have that extra time but the night isn’t as substantial of a threat as it usually is, even though it has a longer period than before.

Please comment as to how you think this could be good or bad and how you think it should be. I would like to hear what everyone has to say :smile:

TL;DR - Day and night cycles should be increased, tell me what you think.


I think this could be the first step in making this a clear non vanilla server. Even just a little move as this. The simple solution is to just sleep. I know there are plug-ins that make it to where when a majority of the server is in bed it’ll make the transition, which I think would work. But physically changing the day and night cycles I’m not game for. But this is just my opinion. d:


I mean… as someone who has been on this server for a while now, I’ve gotten used to the short cycles. I wouldn’t mind having something a little longer, just because on my personal servers that’s how I like it, but I do agree that it does shy away from being strictly vanilla, when we start messing with times and such.


I think this is a good idea but I don’t think the day cycle should be 20m long. More like 15 for day, and 10 for night.
just an opinion


While I do agree that it can be annoying when you’re trying to build something and mobs start to spawn at night-time, I believe it may start to divert too much from the feel of vanilla Minecraft, which is what attracted most of us to the server in the first place. I do however agree with CFCThomas that we could install a plugin that requires only a majority of players to sleep in a bed, since when night-time comes most people just quickly log off the server until someone has slept in a bed anyway. The only time this doesn’t work is when there is one or more people AFK, so a plugin would be able to fix that. Personally I believe mobs should be harder to kill during the night, since once you have any enchanted armour, there is no longer any real threat during the night anyway, as instead most mobs simply become a nuisance.


Adding plugins that allow the majority to sleep is still non vanilla. There is a way to do this that uses command blocks if people are open to it. It was introduced last October on Hermitcraft & has been used alot.


I see what you mean when you say plugins are non vanilla and therefore command blocks would be a better solution, however they both essentially do the exact same thing. Since the command blocks need to be spawned in anyway (as well as setting up a constantly running redstone clock at spawn which may cause more server lag), I feel a plugin may be a better solution. To be honest I don’t really mind which solution, if any, is used, since most of my time is spent either in the cleanroom or underground anyway :slight_smile:


I’m open to setting up something that triggers sleep without everybody sleeping. Typically these kind of tweaks are easy in our CommandHelper scripts, which basically function like plugins.

I had a version of this where players could type /sleep, and it announced to the server that the player was about to initiate server sleep, then there was a 15 second grace period where any players who wanted it to remain night could type /sleep cancel and it would remain night. However I think that something based on beds would be more “vanilla”.

How do you guys think it should work? Majority of players in the world (50%) have to sleep to trigger world sleep? Something different? Note that I haven’t found a way to trigger real server sleep (only time changes), so mobs will not move around, things will not grow, etc.


I think that it could work like if a player is sleeping in a bed, it could announce to the server:

[PLAYER] is now sleeping. [1/4 Players; 25%]
[PLAYER] is now sleeping. [2/4 Players; 50%] Changing time to [DAYTIME]

Triggers to let players know who is sleeping & how many are. Above, change in time occurs at 50% or above. Could be higher or lower depending on what everyone thinks.

Isn’t things not growing while players are in bed is normal game mechanics? Not exactly sure. Could just remove all mobs within an X block radius of the people sleeping (Motivation to actually sleep and not just have someone else do it) that are hostile regarding them

Quote from Minecraft Wiki:
Sleeping only changes the time of day to sunrise; it does not speed up processes which take place over time such as smelting. However, if it were raining or snowing, the weather will end when the player wakes up.



I understand what people are saying using beds and remaining vanilla - but I think most of us can agree that when we think “Vanilla” a plugin to help sleep or whatever isn’t necessarily what most people consider “non-vanilla” Most of us probably look at custom blocks, custom economies, etc.

One could argue that forcing the time change based on majority rules alienates those who want it to be night for the reasons of mob hunting or the like (not all of us are going to build spawn harvesters obviously!)

However needs of the many over needs of the few may end up being the most appealing solution to most of the user base.

I think jacobwg’s original idea could be of use. I’m not familiar with how it wholly originally worked, but here is how I envision a change:

  1. Player enters bed.
  2. Player requests daytime (/sleep or whatevs)
    3 begin a minute timer and a 15 second timer.
  3. game polls 15 secs for objections (/sleep OBJECTION!) (had to lol)
    3a. If an objection is issued, a cooldown period of the command for that player is issued until the end of the minute timer - to avoid continuous abuse, and perhaps give the objecter a chance to say, kill an enderman they saw or something.
  4. if no objections are issued, the command executed.

I feel this properly accommodates users who may want it to be night time. The requirement of the bed also helps to keep things “vanilla” as others were saying.
It shouldn’t be on other players to get to a bed to allow time to pass when only one person is requesting it in my opinion. They’ll either be outside for a reason most likely and want it to be night, or they’ll be in a well lit area or underground and not care - however it shouldn’t necessarily mean they should have to drop what they’re doing.

My apologies if I come off as pushy, I don’t mean to! I just hope this can help illustrate my thoughts on the matter and help us come to a good solution.


Are Obsidian days standard MC days? They feel short compared to my SSP game, but I haven’t checked. In fact they feel miniature.
I’m one of the players who plays a ‘geographical’ game; I travel and build on the surface as if the Obsidian was a place. I don’t use portals unless I have to. I use boats & horses. The day/night cycle is therefore a big factor in how I play.
Altering the cycle would stray from pure vanilla, but not in a way I feel would negatively affect gameplay. I doubt most people would even notice.

I’d love to see days be 20-30 mins and nights be 15-20.


I haven’t modified Obsidian days at all, so they should be vanilla… Maybe I’ll time a day and night cycle in SSP and make sure we’re the same… I’m kinda split between allowing artificial sleep and increasing the daytime.

Maybe we could try a combination of both? Increase the time a bit and require something like 50% or 75% of players to sleep in a bed in order to trigger server sleep. IMO a /sleep command is a little OP (because you don’t even need to be in a bed to trigger it).

@Checkers300, thanks for the wiki link. So the remaining consideration is probably we’d have to make sure that for the players who did enter a bed, their bed home was properly changed, but good to know we don’t need to worry about crops, etc.


Is there a option to test for players being in a bed before the command is executed? Kind of like what you did for irongolems in the cleanroom? If not then the auto-trigger would be the best bet. Also I like the idea of doing both.

Did a test on day-night-cycles. Results:
SSP: 10m Day ; 10m Night
Oby: 10m Day ; 10m Night

They appear to be the same even though they seem different. It’s strange, yet expected. :confused:


Yeah, I can test for players in beds, which seems like a better trigger than a command.


Just to make it clear for those who aren’t aware, night-time in Minecraft isn’t strictly 10 minutes long, and aggressive mobs won’t spawn for the whole 10 minutes either. This is because in Minecraft daytime is 10 minutes, sunset is 1.5 minutes, night-time is 7 minutes and sunrise is also 1.5 minutes, totalling 20 minutes overall. (I did a quick check here to make sure I remembered this correctly if anyone wants to have a look themselves -

If the amount of time in a minecraft day was to change on the server, I think it would be best to scale everything up at the same rate. For example, if daytime was changed to 20 minutes long, then night-time would then become 14 minutes long and sunrise and sunset would then both become 3 minutes long. Whatever the outcome, I definitely believe it would need to be voted on by a majority of people on the server, since it could be considered quite a big leap from a standard vanilla world.

One quick thing I just remembered from a while back in case anyone is interested in it, it is possible to simulate time passing overnight (mainly just crops growing, fire spreading etc. instead of things like furnaces smelting and mobs moving), simply by changing the /gamerule randomTickSpeed to 21,000 for 1 tick whilst everyone is asleep. This will increase the amount of times a block can possibly change state in a second, and since the default number is 3 and night-time lasts for 7000 ticks (7 hours), this could help simulate that time has passed at a consistent rate while everyone was sleeping. I haven’t really tested the effects overall myself (I was originally going to use this idea in a seasons vanilla mod I was making, but I ended up dropping the project), so things such as mob spawners may be effected. Just a quick idea I thought I would put out there.


I think that the scale should also be the same. It seems logical and should be voted on. I believe the tick speed of servers is 20tps (Ticks Per Second).
This is why:
Day: 0 (/time set 0)
Noon: 6000 (/time set 6000)
Evening: 12000 (/time set 12000)
Night: 18000 (/time set 18000)

3 Positions in an area of 15 chunks and given a “random block tick”. You can read more here. Probably what you were thinking about.

Also @jacobwg can I get your permission to create a poll? Example below:

How should The Obsidian deal with the day-night cycle?
(Read “Server Sleeping Mechanics” here first before voting.)

  1. Leave it as it is
  2. Increase day and night time
  3. Have only 50% need of players to sleep
  4. Have both 2 & 3 put into effect


Sure, issue the poll!


Poll is open in the fourm “Server Sleeping Mechanics Poll” and will stay open until Monday, August 10th


Poll Closed ; Results Below:

  1. Leave it as it is ------------------------- 0 votes
  2. Increase day-night cycle ------------- 1 vote
  3. Have only 50% players sleep ------- 2 votes
  4. Increase day-night cycle
    and have only 50% sleep ------------ 5 votes

See here for more info.


So, I just now realized that I don’t know how to change the cycle length :smile: Do you guys know how it’s done? It’s not an option in bukkit.yml, spigot.yml, or There’s a couple of plugins that claim to do it, but they seem to be somewhat hackish (repeatedly setting the time backwards to fake a slower day / night).

I can get started on the 50% sleep requirement.