2020-04-12 18:49:50 +02:00
![Banner ](https://i.imgur.com/WL6QeUA.png )
2018-04-13 11:01:30 +02:00
NPCLib – Basic non-player character library.< br >
2018-05-16 19:37:40 +02:00
[![Release ](https://jitpack.io/v/JitseB/NPCLib.svg )](https://github.com/JitseB/NPCLib/releases)
2018-11-12 22:32:25 +01:00
[![Build Status ](https://travis-ci.com/JitseB/NPCLib.svg?branch=master )](https://travis-ci.com/JitseB/NPCLib)
2020-07-22 11:33:44 +02:00
[![Versions ](https://img.shields.io/badge/MC-1.8.8%20--%20latest-blue.svg )](https://github.com/JitseB/NPCLib/releases)
2019-02-19 22:59:15 +01:00
[![Resource ](https://img.shields.io/badge/SpigotMC-Resource-orange.svg )](https://www.spigotmc.org/resources/npclib.55884/)
2020-07-21 15:53:20 +02:00
[![Discord ](https://img.shields.io/badge/Support-Discord-blue.svg )](https://discord.gg/pvJGhEq)
2018-04-13 11:01:30 +02:00
=
2020-10-15 18:07:50 +02:00
`This project is starting 5 Oct. 2020 no longer actively maintained. I Thank you all for riding along!`
2020-07-22 11:33:08 +02:00
This is an API made specifically for spigot servers (Minecraft). Current supported versions: **1.8.8 - latest** . Lightweight replacement for Citizens. NPCLib only uses packets instead of registering the entity in the actual Minecraft server.
2018-04-13 11:01:30 +02:00
2019-01-02 11:48:23 +01:00
### Preview (click to play video)
2018-11-25 14:10:56 +01:00
[![YouTube Video ](http://img.youtube.com/vi/LqwdqIxPIvE/0.jpg )](http://www.youtube.com/watch?v=LqwdqIxPIvE "NPCLib – Basic non-player character library (Minecraft).")
2018-04-19 19:55:59 +02:00
2018-04-14 11:36:08 +02:00
## Donate
2018-11-12 23:07:02 +01:00
[![PayPal ](https://cdn.rawgit.com/twolfson/paypal-github-button/1.0.0/dist/button.svg )](https://paypal.me/jitseboonstra)
2018-04-14 11:36:08 +02:00
2018-11-25 14:10:56 +01:00
Alternatively, you can help the project by starring the repository or telling others about NPCLib. :smile:
## Developers
### Usage
2018-04-14 11:36:08 +02:00
2019-08-03 15:04:15 +02:00
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 `NPCLib` 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
< repositories >
< repository >
< id > ossrh< / id >
< url > https://oss.sonatype.org/content/groups/public/< / url >
< / repository >
< / repositories >
```
#### Maven dependency
If you have NPCLib under your `plugins` folder, you may use the following:
```xml
< dependencies >
< dependency >
< groupId > net.jitse< / groupId >
< artifactId > npclib-api< / artifactId >
2020-11-07 16:26:49 +01:00
< version > 2.11-SNAPSHOT< / version >
2019-08-03 15:04:15 +02:00
< scope > compile< / scope >
< / dependency >
< / dependencies >
```
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.
2018-05-05 19:34:00 +02:00
2020-04-12 18:48:32 +02:00
[Click here ](https://github.com/JitseB/NPCLib/releases/latest ) to view the latest release.
2018-04-13 18:58:24 +02:00
2020-04-26 19:13:12 +02:00
#### Repacking the library
2020-04-26 19:12:39 +02:00
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:
2020-04-26 19:12:05 +02:00
```xml
< build >
< plugins >
< plugin >
< groupId > org.apache.maven.plugins< / groupId >
< artifactId > maven-shade-plugin< / artifactId >
< version > 3.1.0< / version >
<!-- Do not include the <configuration>...</configuration> part if you are using Sponge! -->
< configuration >
< relocations >
< relocation >
< pattern > net.jitse.npclib< / pattern >
<!-- Replace this with your package! -->
< shadedPattern > your.package< / shadedPattern >
< / relocation >
< / relocations >
< / configuration >
< executions >
< execution >
< phase > package< / phase >
< goals >
< goal > shade< / goal >
< / goals >
< / execution >
< / executions >
< / plugin >
< / plugins >
< / build >
```
2020-04-26 19:13:12 +02:00
#### Tutorial
2019-08-03 15:04:15 +02:00
**[Click here](https://github.com/JitseB/NPCLib/blob/master/DOCUMENTATION.md) for an elaborate explanation on how to use NPCLib in your next project.**
2018-11-25 14:10:56 +01:00
2020-04-26 12:09:58 +02:00
### 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.
2018-11-25 14:10:56 +01:00
### Building your own version
1. [Download ](https://github.com/JitseB/NPCLib/archive/master.zip ) or clone this repository.
2019-08-03 15:04:15 +02:00
2. You can build the project using `mvn clean install` .
2018-11-25 14:10:56 +01:00
2019-08-03 15:04:15 +02:00
The API JAR will be under `/api/target/` and the plugin JAR (which includes all necessary NMS code) will be under `/plugins/target/` .
2018-04-14 11:40:09 +02:00
2020-04-12 18:48:32 +02:00
## License
2018-04-15 19:53:11 +02:00
2018-05-16 19:37:40 +02:00
NPCLib is licensed under the [MIT license ](https://github.com/JitseB/NPCLib/blob/master/LICENSE.md ).
2020-04-12 18:48:32 +02:00
Developers are free to use NPCLib for both private and commercial use. However, it would still be nice to acknowledge me.
2018-04-15 19:53:11 +02:00
2018-04-16 07:56:08 +02:00
## Acknowledgement
2020-04-12 18:48:32 +02:00
I thank all those who have [contributed ](https://github.com/JitseB/NPCLib/graphs/contributors ) to NPCLib over the course of its development.
2018-04-16 07:56:08 +02:00
2020-04-12 18:48:32 +02:00
Please view other credits [here ](https://github.com/JitseB/NPCLib/blob/master/CREDITS.md ).
2019-02-19 22:55:24 +01:00
2018-04-13 18:59:13 +02:00
## Copyright
2018-04-25 21:53:34 +02:00
Copyright (c) Jitse Boonstra 2018 All rights reserved.