Clarified the README.

This commit is contained in:
JitseB 2018-04-13 19:03:44 +02:00
parent 27095fa472
commit c2c21cdf2a
2 changed files with 7 additions and 6 deletions

View File

@ -16,17 +16,18 @@ Current versions supported: 1.8 - 1.12.
```
```Java
// If you want to spawn an NPC, you can generate it like so:
NPC npc = lib.createNPC(skin, autoHideDistance, lines);
// Then you need to generate the packets for the NPC like so:
// 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 like so:
// 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 it accordingly:
// If you don't use the NPC anymore, destroy the NPC accordingly.
npc.destroy();
```

View File

@ -49,7 +49,7 @@ public class NPCLibPlugin extends JavaPlugin implements Listener {
}
MineSkinFetcher.fetchSkinFromIdAsync(168841, skin -> {
NPC npc = npcLib.createNPC(skin, 5, Arrays.asList(
NPC npc = npcLib.createNPC(skin, Arrays.asList(
ChatColor.BOLD + "NPC Library", "",
"Create your own", "non-player characters",
"with the simplistic", "API of NPCLib!"