mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 17:05:20 +01:00
Move time lock check
This commit is contained in:
@@ -422,7 +422,7 @@ public final class World implements Iterable<Player> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// store updated world time every 60 seconds. (in-game hour)
|
// store updated world time every 60 seconds. (in-game hour)
|
||||||
if (this.tickCount % 60 == 0 && !this.timeLocked) {
|
if (this.tickCount % 60 == 0) {
|
||||||
this.getHost().updatePlayerGameTime(this.currentWorldTime);
|
this.getHost().updatePlayerGameTime(this.currentWorldTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -494,7 +494,7 @@ public final class World implements Iterable<Player> {
|
|||||||
* @param gameTime The time in game minutes.
|
* @param gameTime The time in game minutes.
|
||||||
*/
|
*/
|
||||||
public void changeTime(long gameTime) {
|
public void changeTime(long gameTime) {
|
||||||
this.currentWorldTime = gameTime;
|
if (!this.timeLocked) this.currentWorldTime = gameTime;
|
||||||
|
|
||||||
// Trigger script events.
|
// Trigger script events.
|
||||||
this.players.forEach(
|
this.players.forEach(
|
||||||
|
|||||||
Reference in New Issue
Block a user