mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-30 01:38:29 +02:00
fdc031e660
show position , health ,weather and food
13 lines
326 B
JavaScript
13 lines
326 B
JavaScript
export default (socket) => {
|
|
|
|
let onHealth = () => {
|
|
var health = socket.mcbot.health || 0;
|
|
var food = socket.mcbot.food||0;
|
|
var foodSaturation = socket.mcbot.foodSaturation||0;
|
|
socket.emit('bot:health', {health:health,food:food,foodSaturation:foodSaturation});
|
|
};
|
|
|
|
socket.mcbot.on('health', onHealth);
|
|
|
|
};
|