Track protocol 777 health and hunger

This commit is contained in:
Tanner
2026-11-04 17:14:15 +00:00
parent 4129686b07
commit 6dbc61284a
9 changed files with 126 additions and 7 deletions
+8
View File
@@ -107,6 +107,14 @@ class Commands:
if command == 'pos':
reply = str(utils.pint(self.g.pos))[1:-1] + ', ' + self.g.dimension
## !health - replies with health, hunger, and saturation
if command == 'health':
if not self.g.get('health_update_received'):
reply = 'health status not received yet'
else:
reply = 'health {:.1f}, hunger {}/20, saturation {:.2f}'.format(
self.g.health, self.g.food, self.g.food_saturation)
## !afk - goes AFK with /afk
if command == 'afk':
if not self.g.afk: