Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jitseb/npclib
(Minecraft) NPCLib – Basic non-player character library.
https://github.com/jitseb/npclib
library minecraft npc spigot
Last synced: 3 days ago
JSON representation
(Minecraft) NPCLib – Basic non-player character library.
- Host: GitHub
- URL: https://github.com/jitseb/npclib
- Owner: JitseB
- License: mit
- Created: 2018-04-13T06:07:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-16T08:05:57.000Z (over 1 year ago)
- Last Synced: 2025-01-08T00:13:31.344Z (3 days ago)
- Topics: library, minecraft, npc, spigot
- Language: Java
- Homepage:
- Size: 628 KB
- Stars: 195
- Watchers: 9
- Forks: 49
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
![Banner](https://i.imgur.com/WL6QeUA.png)
NPCLib – Basic non-player character library.
[![Versions](https://img.shields.io/badge/MC-1.8.8%20--%201.16.5-blue.svg)](https://github.com/JitseB/NPCLib/releases)
[![Resource](https://img.shields.io/badge/SpigotMC-Resource-orange.svg)](https://www.spigotmc.org/resources/npclib.55884/)
=This is an API made specifically for spigot servers (Minecraft). Current supported versions: **1.8.8 - 1.16.5**. Lightweight replacement for Citizens. NPCLib only uses packets instead of registering the entity in the actual Minecraft server.
### Preview (click to play video)
[![YouTube Video](http://img.youtube.com/vi/LqwdqIxPIvE/0.jpg)](http://www.youtube.com/watch?v=LqwdqIxPIvE "NPCLib – Basic non-player character library (Minecraft).")## Donate
[![PayPal](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg)](https://paypal.me/jitseboonstra)
Alternatively, you can help the project by starring the repository or telling others about NPCLib. :smile:
## Developers
### Usage
There are multiple ways you can make use of NPCLib.
1. The first option is to shade `npclib-plugin.jar` in to your plugin.
2. The second option is to put `npclib-plugin.jar` under your `plugins` folder. By doing this, you no longer need to shade the API JAR. Though, do not forget to add `NPCLibPlugin` as a dependency in your `plugin.yml`!
3. The third option (and the one I recommend most) is to shade the library using Maven. I recently added NPCLib to the OSSRH (OSS Repository Hosting) which allows you to easily import NPCLib into your project.#### Maven repository
```xml
ossrh
https://oss.sonatype.org/content/groups/public/
```
#### Maven dependency
If you have NPCLib under your `plugins` folder, you may use the following:
```xml
net.jitse
npclib-api
2.11.1-SNAPSHOT
compile
```
#### Gradle
```gradle
compileOnly 'net.jitse:npclib-api:2.11.1-SNAPSHOT'
```If you do not want to have NPCLib in your `plugins` folder, you need to use the `npclib-plugin` artifact and [shade it](https://maven.apache.org/plugins/maven-shade-plugin/) accordingly.
Always make sure to use the latest stable release. [Click here](https://github.com/JitseB/NPCLib/releases/latest) to view the latest release.
#### Repacking the library
To make sure the classes won't be twice at the same place. I recommend repacking the library into your package. (Otherwise [issue #79](https://github.com/MinecraftLibraries/NPCLib/issues/79) might occur.) You can do that as follow:
```xml
org.apache.maven.plugins
maven-shade-plugin
3.1.0
net.jitse.npclib
your.package
package
shade
```
#### Tutorial
**[Click here](https://github.com/JitseB/NPCLib/blob/master/DOCUMENTATION.md) for an elaborate explanation on how to use NPCLib in your next project.**### Versioning
For NPCLib I use the follow versioning system:
* 1.x.x: Where the 1 indicates the major version of the library. When this number changes, it's highly likely there're big API changes.
* x.1.x: Where the 1 indicates the minor version of the library. When this number changes, a feature is added or a high priority bug is fixed.
* x.x.1: Where the 1 indicates another minor version of the library. When this number changes, a small bug has been fixed.### Building your own version
1. [Download](https://github.com/JitseB/NPCLib/archive/master.zip) or clone this repository.
2. You can build the project using `mvn clean install`.The API JAR will be under `/api/target/` and the plugin JAR (which includes all necessary NMS code) will be under `/plugins/target/`.
## License
NPCLib is licensed under the [MIT license](https://github.com/JitseB/NPCLib/blob/master/LICENSE.md).
Developers are free to use NPCLib for both private and commercial use. However, it would still be nice to acknowledge me.## Acknowledgement
I thank all those who have [contributed](https://github.com/JitseB/NPCLib/graphs/contributors) to NPCLib over the course of its development.
Please view other credits [here](https://github.com/JitseB/NPCLib/blob/master/CREDITS.md).
## Copyright
Copyright (c) Jitse Boonstra 2018 All rights reserved.