TerraFirmaCraft

TerraFirmaCraft

2M Downloads

daylight game rule isn't ever enabled. Build 95

Claycorp opened this issue · 1 comments

commented

Looks like you did one of the ol fantastic Copy, Pasta and forget to edit.

if (players <= 0)
{
// Force doDaylightCycle false if no players logged on
event.player.world.getGameRules().setOrCreateGameRule("doDaylightCycle", "false");
}

This is part of the playerJoin event and should be setting/checking and setting the dalyight gamerule to true instead of false. The code seems to be a direct copy paste of the code from the playerLogOut event

if (playerCount <= 0)
{
// Force doDaylightCycle false if no players logged on
event.player.world.getGameRules().setOrCreateGameRule("doDaylightCycle", "false");
}

Oops!

commented

idk how I ever thought that was going to work 🤦‍♂