Java 26.2
Weather
Clear
Default duration
/weather clear
Clear, rain, thunder
The /weather command takes a state and an optional duration — leave the duration off and the game picks a random span, after which the cycle flips the sky back. Set clear, rain or thunder here with an explicit duration, and pair it with gamerule doWeatherCycle false when a map needs the weather to stay put.
Java 26.2
Default duration
/weather clear