vu-rcon
TypeScript icon, indicating that this package has built-in type declarations

1.5.5 • Public • Published

Battlefield 3 RCON Interface

npm

Example

import { Battlefield } from "./src/Battlefield"

Battlefield.connect({ 
  host: "127.0.0.1",
  port: 47200,
  password: "RCON_PASSWORD"
}).then(async bf3 => {

  //listen to different events
  bf3.on("playerJoin", ({ name }) => bf3.say(`${name} is joining the game...`))
  bf3.on("playerLeave", event => console.log({ event }))
  bf3.on("kill", ({ killed, weapon }) => killed.say(`You just got killed with ${weapon.name}`))

  //get a list of players and yell the name to them
  const players = await bf3.getPlayers()
  players.forEach(player => player.yell(`Hello ${player.name}`))

  //ban someone
  const player = bf3.getPlayerByName("foobar")
  await player.banGuid().reason("foo").permanent().send()

})

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.5.52latest

Version History

VersionDownloads (Last 7 Days)Published
1.5.52
1.5.40
1.5.30
1.5.20
1.5.10
1.5.00
1.4.00
1.3.101
1.3.90
1.3.80
1.3.70
1.3.60
1.3.50
1.3.40
1.3.30
1.3.20
1.3.10
1.3.00
1.2.110
1.2.100
1.2.90
1.2.80
1.2.70
1.2.6604
1.2.50
1.2.40
1.2.30
1.2.26
1.2.10
1.2.00
1.1.00

Package Sidebar

Install

npm i vu-rcon

Weekly Downloads

613

Version

1.5.5

License

MIT

Unpacked Size

222 kB

Total Files

56

Last publish

Collaborators

  • multivitamin