Prevent updating player game time

This commit is contained in:
KingRainbow44 2023-05-10 21:30:09 -04:00
parent d2203cc511
commit c0381d3795
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -328,7 +328,10 @@ public class Player {
* @param gameTime The new game time.
*/
public void updatePlayerGameTime(long gameTime) {
if (this.getWorld().isTimeLocked()) return;
if (this.playerGameTime == gameTime) return;
// Update the game time.
this.playerGameTime = gameTime;
// If the player is the host of the world, update the game time as well.