mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-19 21:03:28 +02:00
12 lines
323 B
JavaScript
12 lines
323 B
JavaScript
module.exports = function(socket) {
|
|
|
|
// spawn event
|
|
socket.mcbot.on('spawn', function() {
|
|
var pos = socket.mcbot.entity.position;
|
|
socket.emit('buffer:info', 'Spawned at X:' + pos.x + ', Y:' + pos.y + ', Z:' + pos.z);
|
|
socket.emit('bot:players', socket.mcbot.players);
|
|
socket.emit('bot:spawn');
|
|
});
|
|
|
|
};
|