is Daylight Time
Check to see if current time is within the daytime value given.
gameplay.isDaylightTime(DAY)Parameters
- query: the time of day to query:
daydawnmiddaydusknightmidnight
Returns
- a boolean value that is
trueif the current time is within the daytime value given,falseotherwise.
Example
Give a chat message saying whether the current time is during the day or not.
if (gameplay.isDaylightTime(DAY)) {
player.say("It's day.")
} else {
player.say("It's not day.")
}