mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-02-06 10:06:51 +01:00
Prevent updating player game time
This commit is contained in:
@@ -328,7 +328,10 @@ public class Player {
|
|||||||
* @param gameTime The new game time.
|
* @param gameTime The new game time.
|
||||||
*/
|
*/
|
||||||
public void updatePlayerGameTime(long gameTime) {
|
public void updatePlayerGameTime(long gameTime) {
|
||||||
|
if (this.getWorld().isTimeLocked()) return;
|
||||||
if (this.playerGameTime == gameTime) return;
|
if (this.playerGameTime == gameTime) return;
|
||||||
|
|
||||||
|
// Update the game time.
|
||||||
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.
|
||||||
|
|||||||
Reference in New Issue
Block a user