1.3.2 • Published 15 days ago

mineflayer-plasmovoice v1.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
15 days ago

Features

  • 🔥 Supports CommonJS and ES6
  • 🔈 Allows to send any soundfile formats using FFMPEG
  • 🔒 Works with AES-128-CBC and RSA Encryption
  • 👀 Almost exactly mimics the behavior of the original mod
  • 🖧 Using ProtoDef to assemble the packets
  • 📎 Supports "/vrc" command
  • ↗ Automatically reconnects in case of connection loss

Getting Started

Installation

1) This plugin is built using Node and can be installed using: npm install mineflayer-plasmovoice --save

Simple Sound Player

A bot that sneaks will play a certain sound (/path/to/music.mp3) and get up.

const mineflayer = require("mineflayer")
const plasmo = require("mineflayer-plasmovoice")

const bot = mineflayer.createBot({
    "host": "localhost"
})

bot.loadPlugin(plasmo.plugin)

bot.on("plasmovoice_connected", () => {
    bot.setControlState("sneak", true)

    // Path to file with any audio format
    bot.plasmovoice.sendAudio("/path/to/music.mp3")
})

bot.on("plasmovoice_audio_end", () => {
    bot.setControlState("sneak", false)
})

Debugging

const plasmo = require("mineflayer-plasmovoice")

/** By default - 4, and these are warnings, errors and fatal errors */
plasmo.setLoggingLevel(0)

Listening players

An example of an event when some player is talking

  • Data format is pcm_s16le
  • Sequence number goes in order from zero, some packet may be skipped when using the UDP protocol
bot.on("plasmovoice_voice", (data) => {
    /*{
        player: string,
        distance: number
        sequenceNumber: BigInt
        data: Buffer
    }*/
})

An example of an event when some player stopped talking

bot.on("plasmovoice_voice_end", (data) => {
    /*{
        player: string,
        sequenceNumber: BigInt
    }*/
})

License

This project uses the MIT license.


Contributors:

  • ↗ Maks-gaming - The idea and implementation of the plugin structure;
  • 📎 CralixRaev - Helped to deal with ProtoDef;
  • 🔥 Plasmo R&D - helped to understand some things in the packet system;

This project is accepting PRs and Issues. See something you think can be improved? Go for it! Any and all help is highly appreciated!

For larger changes, it is recommended to discuss these changes in the issues tab before writing any code. It's also preferred to make many smaller PRs than one large one, where applicable.

1.3.2

15 days ago

1.3.1-b

26 days ago

1.3.1-a

1 month ago

1.3.1

1 month ago

1.3.0

2 months ago

1.2.4

2 months ago

1.2.3

2 months ago

1.2.2

2 months ago

1.2.0-c

2 months ago

1.2.1-a

2 months ago

1.2.1

2 months ago

1.2.0

2 months ago

1.2.0-a

2 months ago

1.2.0-b

2 months ago

1.1.11

2 months ago

1.1.10

2 months ago

1.1.11-a

2 months ago

1.1.9

4 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.1.8

9 months ago

1.1.4-a

9 months ago

1.1.7

9 months ago

1.1.3-a

9 months ago

1.1.1-c

9 months ago

1.1.6

9 months ago

1.1.2-a

9 months ago

1.1.1-b

9 months ago

1.1.5

9 months ago

1.1.1-a

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.0.2

12 months ago

1.0.3

12 months ago

1.0.1

1 year ago

0.0.0

1 year ago

1.0.0

1 year ago