mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-22 20:03:21 +00:00
Fix issue with time when a player reconnects without a world
This commit is contained in:
parent
3c0e834348
commit
fd40575cb4
@ -345,8 +345,9 @@ public class Player implements PlayerHook, FieldFetch {
|
||||
this.playerGameTime = gameTime;
|
||||
|
||||
// If the player is the host of the world, update the game time as well.
|
||||
if (this.getWorld().getHost() == this) {
|
||||
this.getWorld().changeTime(gameTime);
|
||||
var world = this.getWorld();
|
||||
if (world != null && world.getHost() == this) {
|
||||
world.changeTime(gameTime);
|
||||
}
|
||||
|
||||
// Trigger the script event for game time update.
|
||||
|
Loading…
Reference in New Issue
Block a user