{"id":31500269,"url":"https://github.com/eisi05/npcapi-spigot","last_synced_at":"2026-06-03T23:00:27.873Z","repository":{"id":297252351,"uuid":"996234850","full_name":"Eisi05/NpcApi-Spigot","owner":"Eisi05","description":"A simple API to create and manage customizable Minecraft NPCs","archived":false,"fork":false,"pushed_at":"2026-06-02T08:39:37.000Z","size":607,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-02T10:23:51.476Z","etag":null,"topics":["api","bukkit","minecraft","npc","spigot","spigotmc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eisi05.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["Eisi05"]}},"created_at":"2025-06-04T16:46:34.000Z","updated_at":"2026-06-02T08:39:42.000Z","dependencies_parsed_at":"2026-03-07T02:00:31.246Z","dependency_job_id":null,"html_url":"https://github.com/Eisi05/NpcApi-Spigot","commit_stats":null,"previous_names":["eisi05/npcapi"],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/Eisi05/NpcApi-Spigot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eisi05%2FNpcApi-Spigot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eisi05%2FNpcApi-Spigot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eisi05%2FNpcApi-Spigot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eisi05%2FNpcApi-Spigot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eisi05","download_url":"https://codeload.github.com/Eisi05/NpcApi-Spigot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eisi05%2FNpcApi-Spigot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33883102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","bukkit","minecraft","npc","spigot","spigotmc"],"created_at":"2025-10-02T17:09:00.829Z","updated_at":"2026-06-03T23:00:27.853Z","avatar_url":"https://github.com/Eisi05.png","language":"Java","funding_links":["https://github.com/sponsors/Eisi05"],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/Eisi05/NpcApi.svg)](https://jitpack.io/#Eisi05/NpcApi)\n\n[NPC Plugin on SpigotMC](https://www.spigotmc.org/resources/npc-plugin-1-17.87761/)\n\n[NpcApi for PaperMC](https://github.com/Eisi05/NpcApi-Paper)\n\n# NpcAPI\n\nA powerful and easy-to-use NPC (Non-Player Character) API for Minecraft Spigot plugins that allows you to create, manage, and customize NPCs with\nadvanced features.\n\n## Wiki\n\nSee the in-repo wiki pages under:\n[📚 Project Wiki](https://github.com/Eisi05/NpcApi-Spigot/wiki)\n\n## Features\n\n- Create custom NPCs with ease\n- Customize NPC appearance (skins, glowing effects, etc.)\n- Handle click events and interactions\n- Play animations and control NPC behavior\n- Save and load NPCs persistently\n- Show/hide NPCs for specific players\n- Comprehensive NPC management system\n- Let NPCs walk around\n\n## Installation\nChoose your preferred installation method based on your project needs:\n\n### Method 1: Plugin Dependency (Recommended)\n\nThis method requires [NpcPlugin](https://www.spigotmc.org/resources/npc-plugin-1-17.87761/) to be installed as a separate plugin on the server.\n\n#### Maven\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.Eisi05\u003c/groupId\u003e\n    \u003cartifactId\u003eNpcApi\u003c/artifactId\u003e\n    \u003cversion\u003e2.2.2\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n#### Gradle\n```gradle\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n\ndependencies {\n    compileOnly 'com.github.Eisi05:NpcApi:2.2.2'\n}\n```\n\n#### Plugin Configuration\nAdd NpcPlugin as a dependency in your `plugin.yml`:\n```yaml\n# Required dependency (hard dependency)\ndepend: [NpcPlugin]\n\n# Or optional dependency (soft dependency)\nsoft-depend: [NpcPlugin]\n```\n---\n\n### Method 2: Shaded Dependency\n\nThis method bundles NpcApi directly into your plugin JAR file.\n\n#### Maven\nAdd the repository and dependency to your `pom.xml`:\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.github.Eisi05\u003c/groupId\u003e\n        \u003cartifactId\u003eNpcApi\u003c/artifactId\u003e\n        \u003cversion\u003e2.2.2\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n#### Gradle\nAdd the following to your `build.gradle`:\n```gradle\ndependencyResolutionManagement {\n    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)\n    repositories {\n        mavenCentral()\n        maven { url 'https://jitpack.io' }\n    }\n}\n\ndependencies {\n    implementation 'com.github.Eisi05:NpcApi:2.2.2'\n}\n```\n\n#### Plugin Configuration\nTo enabled/disable the NpcApi add this to your Plugin Main class:\n```java\n\n@Override\npublic void onEnable()\n{\n    // Initialize NpcAPI with default configuration\n    NpcApi.createInstance(this, new NpcConfig());\n}\n\n@Override\npublic void onDisable()\n{\n    // Properly disable NpcAPI\n    NpcApi.disable();\n}\n```\n---\n\n## Usage Examples\n\n### Creating a Basic NPC\n\n```java\n// Create a location where the NPC should spawn\nLocation location = new Location(world, x, y, z);\n\n// Create a new NPC with a name\nNPC npc = new NPC(location, WrappedComponent.create(\"Test\"));\n\n// Enable the NPC to make it visible to all players\nnpc.setEnabled(true);\n```\n\n### Customizing NPC Appearance\n\n```java\n// Make the NPC glow with a red color\nnpc.setOption(NpcOption.GLOWING, ChatColor.RED);\n\n// Set a custom skin from a player\nnpc.setOption(NpcOption.SKIN, NpcSkin.of(Skin.fromPlayer(player)));\n```\n\n### Handling Click Events\n\n```java\n// Set up a click event handler\nnpc.setClickEvent(event -\u003e {\n    Player player = event.getPlayer();\n    NPC clickedNpc = event.getNpc();\n    player.sendMessage(\"You clicked \" + clickedNpc.getName().toLegacy());\n});\n```\n\n### Managing NPC State\n\n```java\nnpc.save();\nnpc.setName(NpcName.of(WrappedComponent.create(\"New Name\")));\nnpc.setLocation(newLocation);\nnpc.reload();\n```\n\n### Advanced NPC Control\n\n```java\nnpc.playAnimation(/* animation parameters */);\nnpc.showNPCToPlayer(player);\nnpc.hideNpcFromPlayer(player);\nnpc.lookAtPlayer(player);\nnpc.delete();\nnpc.walkTo(path, player, walkSpeed, changeRealLocation);\n```\n\n## NPC Management\n\n### Getting All NPCs\n\n```java\n// Get a list of all available NPCs\nList\u003cNPC\u003e allNpcs = NpcManager.getList();\n```\n\n### Finding NPCs by UUID\n\n```java\n// Get a specific NPC by its UUID\nUUID npcUuid = /* your NPC's UUID */;\nNPC npc = NpcManager.fromUUID(npcUuid);\n```\n\n## API Reference\n\n### NPC Class\n\n| Method                                  | Description                                                                 |\n|-----------------------------------------|-----------------------------------------------------------------------------|\n| `setOption(NpcOption, Object)`          | Set NPC options like glowing, skin, etc.                                    |\n| `setClickEvent(Consumer\u003cClickEvent\u003e)`   | Set the click event handler                                                 |\n| `setEnabled(boolean)`                   | Enable/disable NPC visibility                                               |\n| `save()`                                | Save NPC to persistent storage                                              |\n| `reload()`                              | Reload NPC data                                                             |\n| `setName(NpcName)`                      | Update NPC display name                                                     |\n| `setLocation(Location)`                 | Move NPC to new location                                                    |\n| `playAnimation(...)`                    | Play NPC animation                                                          |\n| `showNPCToPlayer(Player)`               | Show NPC to specific player                                                 |\n| `hideNpcFromPlayer(Player)`             | Hide NPC from specific player                                               |\n| `lookAtPlayer(Player)`                  | Make NPC look at player                                                     |\n| `delete()`                              | Remove NPC permanently                                                      |\n| `walkTo(Path, double, boolean, Consumer\u003cResult\u003e, players)` | Let the NPC walk along a path (can be created with PathfindingUtils class)  |\n\n## Requirements\n\n- Java 17+\n- Spigot 1.17+ (compatible with newer versions)\n- Minecraft server with NPC support\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feisi05%2Fnpcapi-spigot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feisi05%2Fnpcapi-spigot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feisi05%2Fnpcapi-spigot/lists"}