# conduit-plugin

> Base plugin for Conduit

Latest version **1.0.1** (published 2019-10-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install conduit-plugin
pnpm add conduit-plugin
yarn add conduit-plugin
bun add conduit-plugin
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-10-10 |
| First published | 2019-10-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | redducks |
| Maintainers | redducks |

## Links

- npm: https://www.npmjs.com/package/conduit-plugin
- Repository: https://github.com/Conduit-MC/conduit-plugin
- Homepage: https://github.com/Conduit-MC/conduit-plugin#readme
- Issues: https://github.com/Conduit-MC/conduit-plugin/issues
- npm.io page: https://npm.io/package/conduit-plugin

## Recent versions

- 1.0.1 (latest) — 2019-10-10
- 1.0.0 — 2019-10-10

## README

# Conduit Plugin

Base plugin for Conduit

Conduit comes with a simple plugin API. Conduit will try to load plugins from the `plugins` folder. Each plugin must be in it's own folder and contain a `package.json` file and/or an `index.js` file.

## Example
```javascript
const ConduitPlugin = require('conduit-plugin');

class MyCustomPlugin extends ConduitPlugin {
	constructor(server) {
		super(server);
	}

	onInitialized() {
		console.log('This message is from a plugin. I have hooked the `initialized` event handle! I run BEFORE the base plugin');
	}

	onBeforeChat(event) {
		event.getSender()
			.sendMessage('This message is sent via a plugin using `onBeforeChat`. This event runs before the chat packet is handled internally or by other plugins');
	}
}

module.exports = MyCustomPlugin;
```

## Plugin API
### **The plugin API docs can be found in the [Wiki](https://github.com/Conduit-MC/conduit-plugin/wiki)**

---
_Source: https://npm.io/package/conduit-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
