luxball
v1.0.6
Published
Script for hosting Luxball Rooms
Downloads
30
Readme
luxball
Script for hosting Luxball Rooms
Installation
npm i luxballUsage
import createRoom from 'luxball';
createRoom({
playerName: "Admin",
roomSettings: {
name: `Room Test`,
joinToken: "luxball",
password: "",
maxPlayers: 20,
showInRoomList: false
}
}).then((room) => {
room.onRoomLink = (roomLink) => {
const roomId = roomLink.split("=")[1]
console.log("Room URL:", `https://luxball.online/play/${roomId}`)
}
room.onPlayerJoin = function (player) {
room.setPlayerTeam(player.id, 1);
room.startGame();
}
room.onPlayerChat = function (player, message) {
console.log(player.name, message)
}
});