Files
NPCLib/README.md
T
2018-04-13 19:08:53 +02:00

35 lines
914 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
NPCLib Basic non-player character library.<br>
[![Release](https://jitpack.io/v/JitseB/npclib.svg)](https://github.com/JitseB/npclib/releases)
[![JDK](https://img.shields.io/badge/Using-Java%208-red.svg)](http://jdk.java.net/8/)
=
This is an API made specifically for spigot servers (Minecraft).
Current versions supported: 1.8 - 1.12.
## Usage
```Java
// First we define our (global) library variable.
// This is usually done in the onEnable method.
NPCLib lib = new NPCLib(plugin);
```
```Java
// 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 don't use the NPC anymore, destroy the NPC accordingly.
npc.destroy();
```
## Copyright
Copyright (c) Jitse Boonstra 2018 All rights reserved.