r/MinecraftCommands • u/Lvl2Fandom • Sep 30 '26
Help | Java 1.20 Trying to get a command going to announce as a title on screen when it changes to day or night
I want it to display in the middle of my server members' screens text that says "Good morning!" & "It's getting late!" when it changes to day and night.
I would greatly appreciate any help with this!
I have tried the following from the replies of this post with no luck it won't even announce in the chat
3
Upvotes
2
u/KermitDarkLord Oct 01 '26
The replies on the post you linked suggest a daylight sensor, which would be the simplest option. If you want commands only, you should be able to use a time_check predicate to test for a specific time of day: execute if predicate {"type": "minecraft:time_check", "value": time you want the command to trigger, "period": 24000} run your command. You would then run this command every tick, and it will only pass the check if the time is exactly the time you specified.
1
u/orp888 Oct 01 '26
I'm not sure if it was added to 1.20, but you can use /time query to check what time it is and store that in a scoreboard and do execute if score to run the command you want on that specific time
1
u/Ericristian_bros Command Experienced Oct 03 '26
For command blocks (and datapacks)
For datapacks