Static
prefixedCheck for the presence or absence of a member with a given name.
The authentication information to create the swarm member with.
Calls each of the listeners registered for a given event.
Return an array listing the events for which the emitter has registered listeners.
Check for the presence or absence of a plugin with a given name.
The plugin to query for.
Returns true if the given plugin is loaded in the swarm, otherwise returns false.
Check for the presence or absence of a member with a given name.
The username to query for.
Returns true if the given username is contained in the swarm, otherwise returns false.
Return the number of listeners listening to a given event.
Return the listeners registered for a given event.
Load a plugin
The plugin to add.
Optional
plugin: PluginDEPRECATED OPTION. WILL BE REMOVED IN A FUTURE RELEASE.
Returns true if the given plugin is loaded in the swarm, otherwise returns false.
Add a listener for a given event.
Optional
context: anyAdd a one-time listener for a given event.
Optional
context: anyRemove all listeners, or those of the specified event.
Optional
event: string | symbolRemove the listeners of a given event.
Optional
fn: (...args: any[]) => voidOptional
context: anyOptional
once: boolean
Represents a swarm of mineflayer bots. Bots are removed from the swarm on disconnect.
See
createSwarm to create a swarm object.