Track protocol 777 health and hunger
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user