From 0b32bc642132d543d798f903ce16a804b585afe1 Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sun, 28 Nov 2021 22:46:32 -0600 Subject: [PATCH] Fix minute NaN in settime --- scripts/server/config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/server/config.js b/scripts/server/config.js index 2f72dd17..f277ca6a 100644 --- a/scripts/server/config.js +++ b/scripts/server/config.js @@ -286,7 +286,7 @@ function setTimeCommand(command, params, client) { let splitParams = params.split(" "); let hour = toInteger(splitParams[0]); - let minute = toInteger(splitParams[1]); + let minute = toInteger(splitParams[1]) || 0; if(hour > 23 || hour < 0) { messagePlayerError(client, "The hour must be between 0 and 23!"); @@ -393,7 +393,7 @@ function setSnowingCommand(command, params, client) { } let splitParams = params.split(" "); - let falling = splitParams[1]; + let falling = splitParams[0]; let ground = splitParams[1]; getServerConfig().fallingSnow = intToBool(toInteger(falling));