add new feature:

show position , health ,weather and food
This commit is contained in:
shugen002
2016-02-01 17:38:35 +08:00
parent b34486b603
commit fdc031e660
8 changed files with 107 additions and 1 deletions
+12
View File
@@ -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);
};