mirror of
https://github.com/Threnklyn/MinecraftChat.git
synced 2026-05-28 00:38:30 +02:00
12 lines
280 B
JavaScript
12 lines
280 B
JavaScript
module.exports = (socket) => {
|
|
|
|
function onSpawn() {
|
|
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.mcbot.on('spawn', onSpawn);
|
|
|
|
};
|