mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 04:57:18 +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;
|
this.playerGameTime = gameTime;
|
||||||
|
|
||||||
// If the player is the host of the world, update the game time as well.
|
// If the player is the host of the world, update the game time as well.
|
||||||
if (this.getWorld().getHost() == this) {
|
var world = this.getWorld();
|
||||||
this.getWorld().changeTime(gameTime);
|
if (world != null && world.getHost() == this) {
|
||||||
|
world.changeTime(gameTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger the script event for game time update.
|
// Trigger the script event for game time update.
|
||||||
|
Loading…
Reference in New Issue
Block a user