Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

refrainsclub/npcs

Repository files navigation

NPCs

This is a plugin that enables you to create lightweight NPCs.

Usage

  1. Publish the plugin to your local maven repo using gradle publish
  2. Install the plugin to your Spigot server.
  3. Add the plugin as a dependency to your Spigot plugin.

Goals

  • The aim of this plugin is to provide a lightweght NPC solution.
  • This plugin will NOT support AI logic, it is up to you to implement.
  • In the future, newer versions may be supported.

Example

// Get the NPC API
NpcsApi npcsApi = NpcsPlugin.getApi()
// Create a global NPC
Npc npc = npcsApi.createNpc("Test", location, true);
// Run an asynchronous task to prevent blocking the main thread 
Bukkit.getScheduler().runTaskAsynchronously(plugin, () -> {
 // Get a skin from the Mojang API
 Skin skin = SkinUtil.getSkin("Notch");
 // Set the NPC's skin
 npc.setSkin(skin);
});

About

Lightweight NPCs for Spigot 1.8.8

Topics

Resources

License

Stars

Watchers

Forks

Languages

AltStyle によって変換されたページ (->オリジナル) /