Go to file
JitseB 15335c24f1 For v1.1.4.
Fixed the usage of NPCLib as a plugin dependency without shading it.
2018-05-20 10:13:58 +02:00
api For v1.1.4. 2018-05-20 10:13:58 +02:00
commons For v1.1.4. 2018-05-20 10:13:58 +02:00
nms For v1.1.4. 2018-05-20 10:13:58 +02:00
plugin For v1.1.4. 2018-05-20 10:13:58 +02:00
.gitignore Few Maven changes and added a build script. 2018-05-06 17:20:12 +02:00
.travis.yml Revert previous commit. 2018-05-06 13:08:07 +02:00
LICENSE.md Added a proper license (MIT license). 2018-04-19 18:00:24 +02:00
README.md For v1.1.4. 2018-05-20 10:13:58 +02:00
build.sh Few Maven changes and added a build script. 2018-05-06 17:20:12 +02:00
pom.xml For v1.1.4. 2018-05-20 10:13:58 +02:00

README.md

NPCLib Basic non-player character library.
Release Build Status JDK Versions

This is an API made specifically for spigot servers (Minecraft). Current supported versions: 1.8 - 1.12. Lightweight replacement for Citizens. NPCLib only uses packets instead of registering the entity in the actual Minecraft server.

Resource: https://www.spigotmc.org/resources/npclib.55884/
Thread: https://www.spigotmc.org/threads/npclib--basic-non-player-character-library.314460/
Preview: https://youtu.be/LqwdqIxPIvE

Donate

PayPal

Alternatively, you can help the project by starring the repository or telling others about NPCLib 😄

Usage

It is recommended to shade NPCLib-API-v*.jar into your plugin. Alternatively, you may put NPCLib-Plugin-v*.jar under your plugins folder. By using this option, you do not need to shade the API JAR anymore. Though, do not forget to add NPCLib as a dependency in your plugin.yml!

You can download the latest release here.

    // First we define our (global) library variable.
    // This is usually done in the onEnable method.
    NPCLib lib = new NPCLib(plugin);

   // Creating an NPC.
   NPC npc = lib.createNPC(skin, lines);

   // The generate the packets for the NPC.
   npc.create(location);

   // Then *finally* you can show/hide it to/from players.
   npc.show(player);
   npc.hide(player);

   // If you do not use the NPC anymore, destroy the NPC accordingly.
   npc.destroy();

Usable events: NPCSpawnEvent, NPCDestroyEvent and NPCInteractEvent.

License and plugins using NPCLib

NPCLib is licensed under the MIT license. Developers are free to use NPCLib for both private and commercial use. Though, it would be nice to acknowledge me.

You (the developer) can also contact me if you wish to be added to the list below.

Plugin(s) using NPCLib:

Acknowledgement

We thank all those who have contributed to the creation of what NPCLib is today.

Copyright (c) Jitse Boonstra 2018 All rights reserved.