Go to file
Jitse Boonstra a6e8c0f4ce Updates for v1.3. 2018-11-25 14:10:56 +01:00
api Updates for v1.3. 2018-11-25 14:10:56 +01:00
commons Updates for v1.3. 2018-11-25 14:10:56 +01:00
nms Updates for v1.3. 2018-11-25 14:10:56 +01:00
plugin Updates for v1.3. 2018-11-25 14:10:56 +01:00
.gitignore Few Maven changes and added a build script. 2018-05-06 17:20:12 +02:00
.travis.yml Work for v1.2.2. 2018-11-12 21:42:28 +01:00
LICENSE.md Added a proper license (MIT license). 2018-04-19 18:00:24 +02:00
README.md Updates for v1.3. 2018-11-25 14:10:56 +01:00
build.sh Updates for v1.3. 2018-11-25 14:10:56 +01:00
pom.xml Updates for v1.3. 2018-11-25 14:10:56 +01:00

README.md

Banner 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.13.2. Lightweight replacement for Citizens. NPCLib only uses packets instead of registering the entity in the actual Minecraft server.

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

Preview (click to play video)

YouTube Video

Donate

PayPal

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

Developers

Usage

It is recommended to shade npclib-api-v*.jar into your plugin. Alternatively, you can put npclib-plugin-v*.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!

Click here to download the latest release.

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

   // Creating a new NPC instance.
   NPC npc = lib.createNPC(skin, lines);

   // Then let the library generate the necessary packets.
   npc.create(location);

   // You are all set! You can now show/hide it to/from players.
   npc.show(player);
   npc.hide(player);

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

Events

Events you may want to use are NPCSpawnEvent, NPCDestroyEvent and NPCInteractEvent.

Building your own version

  1. Download or clone this repository.
  2. Build the plugin using sh build.sh. Alternatively, you can build the API JAR manually using mvn clean install.

You can build the plugin using mvn clean install -pPlugin.

License and plugins using NPCLib

NPCLib is licensed under the MIT license. Developers are free to use NPCLib for both private and commercial use. However, 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.