mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-06-06 05:08:29 +02:00
add new feature:
show position , health ,weather and food
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user