Fix getShouldSleep for Uranium server

This commit is contained in:
bdnugget committed 2024-08-12 00:43:26 +02:00
1 parent a26341fc4d
commit ff2543caa9
1 file changed
+6 -1
+6 -1
View File
@@ -5064,8 +5064,13 @@ public class Controller {
return mud.getIsSleeping();
}
/**
* Returns whether or not the player should sleep. Extra check with `getFatigue()` because callbacks.MessageCallback does not reliably set this from game messages.
*
* @return boolean
*/
public boolean getShouldSleep() {
return shouldSleep;
return shouldSleep || (isAuthentic() && getFatigue() >= 99);
}
public void setShouldSleep(boolean shouldSleep) {