# mineflayer-autocrystal

> mineflayer-autocrystal is a plugin that lets mineflayer bots automatically place and destroy end crystals.

Latest version **0.7.0** (published 2021-09-04) · ISC license · 0 weekly downloads

## Install

```sh
npm install mineflayer-autocrystal
pnpm add mineflayer-autocrystal
yarn add mineflayer-autocrystal
bun add mineflayer-autocrystal
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.7.0 |
| Published | 2021-09-04 |
| First published | 2021-03-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 83.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Link#0069 |
| Maintainers | link-dev |

## Links

- npm: https://www.npmjs.com/package/mineflayer-autocrystal
- npm.io page: https://npm.io/package/mineflayer-autocrystal

## Dependencies (4)

- [vec3](https://npm.io/package/vec3.md) ^0.1.7
- [mineflayer](https://npm.io/package/mineflayer.md) ^3.11.0
- [typescript](https://npm.io/package/typescript.md) ^4.4.2
- [prismarine-entity](https://npm.io/package/prismarine-entity.md) ^1.2.0

## Recent versions

- 0.7.0 (latest) — 2021-09-04
- 0.6.2 — 2021-08-29
- 0.6.1 — 2021-08-29
- 0.6.0 — 2021-08-29
- 0.5.0 — 2021-08-15
- 0.4.0 — 2021-07-26
- 0.3.1 — 2021-03-28
- 0.3.0 — 2021-03-24
- 0.1.2 — 2021-03-23
- 0.1.1 — 2021-03-20
- 0.1.0 — 2021-03-20

## README

<h1 align="center">Welcome to mineflayer-autocrystal 👋</h1>
<p>
  <a href="https://www.npmjs.com/package/mineflayer-autocrystal" target="_blank">
    <img alt="Version" src="https://img.shields.io/npm/v/mineflayer-autocrystal.svg">
  </a>
  <a href="https://github.com/LINKdiscordd/mineflayer-autocrystal#readme" target="_blank">
    <img alt="Documentation" src="https://img.shields.io/badge/documentation-yes-brightgreen.svg" />
  </a>
  <a href="https://github.com/LINKdiscordd/mineflayer-autocrystal/graphs/commit-activity" target="_blank">
    <img alt="Maintenance" src="https://img.shields.io/badge/Maintained%3F-yes-green.svg" />
  </a>
  <a href="https://github.com/LINKdiscordd/mineflayer-autocrystal/blob/master/LICENSE" target="_blank">
    <img alt="License: ISC" src="https://img.shields.io/github/license/LINKdiscordd/mineflayer-autocrystal" />
  </a>
</p>

> mineflayer-autocrystal is a plugin that lets mineflayer bots automatically place and destroy end crystals.

### 🏠 [Homepage](https://github.com/LINKdiscordd/mineflayer-autocrystal)

[![Autocrystal CI](https://github.com/link-discord/mineflayer-autocrystal/actions/workflows/ci.yml/badge.svg)](https://github.com/link-discord/mineflayer-autocrystal/actions/workflows/ci.yml)

## Install

```sh
npm install mineflayer-autocrystal
```

## Example

```js
const mineflayer = require('mineflayer')
const { autoCrystal } = require('../lib/index')

function main() {
	const bot = mineflayer.createBot({
		host: 'localhost',
		username: 'AutoCrystal',
	})

	bot.loadPlugin(autoCrystal)

	bot.once('spawn', () => {
		bot.autoCrystal.options.logErrors = true
		console.clear()
		console.log('Spawned.')
		bot.chat('/gamemode creative')
		bot.chat('/give @s end_crystal 500')
	})

	bot.on('end', () => {
		main()
	})

	bot.on('kicked', (reason) => {
		console.log(reason)
		main()
	})

	bot.on('error', (reason) => {
		console.error(reason)
		main()
	})

	bot.on('chat', async (username, message) => {
		if (username === bot.username) return

		switch (message) {
			case 'start':
				bot.chat('AutoCrystal enabled.')
				await bot.autoCrystal.enable()
				break

			case 'stop':
				bot.chat('AutoCrystal disabled.')
				await bot.autoCrystal.disable()
				break

			case 'holes':
				const holes = await bot.autoCrystal.getHoles()
				bot.chat(`Found ${holes.length} holes made out of bedrock.`)
				break

			default:
				break
		}
	})
}

main()
```

## Author

👤 **Link#0069**

* Github: [@LINKdiscordd](https://github.com/LINKdiscordd)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/LINKdiscordd/mineflayer-autocrystal/issues). 

## Show your support

Give a ⭐️ if this project helped you!

## 📝 License

Copyright © 2021 [Link#0069](https://github.com/LINKdiscordd).<br />
This project is [GNU GPLv3](https://github.com/LINKdiscordd/mineflayer-autocrystal/blob/master/LICENSE) licensed.

***
_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_

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