JP Plugins
All plugins

JPNpcs

Player and mob NPCs with skins, holograms and click actions for Paper servers.

Display plugin, version 1.0.0

Downloads open soon.

Features

  • Player NPCs with skins, and mob NPCs
  • Click actions: commands, messages, menus and dialogues
  • Holograms above NPCs and NPCs that look at players
  • Walking paths and greetings
  • In-game NPC editor
  • API with an NPC click event

Requirements

  • Paper 26.1 or newer (Java 25)
  • Optional:
    • PlaceholderAPI: placeholders in texts, and this plugin's own placeholders
    • Vault: money (any Vault economy)

Installation

  1. Put JPNpcs-<version>.jar in your server's plugins folder.
  2. Restart the server. plugins/JPNpcs/ is created with the config and messages.
  3. Change what you want in the files, then reload or restart.

Type /jp as an operator to see every JP plugin you have installed, its version and which optional plugins it found.

Commands

CommandDescriptionPermission
/npc help
Aliases: /npcs, /jpnpcs
Create and edit NPCs.jpnpcs.admin

Permissions

PermissionDefaultDescription
jpnpcs.adminoperatorsCreate, edit and remove NPCs.

For developers

Add softdepend: [JPNpcs] to your plugin.yml.

EventWhen
com.jp.npcs.api.NpcInteractEventA player clicked an NPC: getNpcId() and getClickType(). Cancel it to stop the NPC's own actions.

Configuration

All files are in plugins/JPNpcs/. Files: config.yml, dialogues.yml, messages.yml.

When you update the plugin, new options are added to your config.yml by themselves, with their comments. Your own settings stay as they are, and the old file is kept as config.old-v<number>.yml.

Languages: English, Spanish, Portuguese, French and German. Set language: in config.yml (en, es, pt, fr or de).

Default config.yml
# Used to add new options to this file after an update. Don't change it.
config-version: 1

# ╔══════════════════════════════════════════════════════════════════╗
# ║                     JPNpcs  ·  config.yml                        ║
# ╚══════════════════════════════════════════════════════════════════╝
# NPCs that look like players (with any skin) or like any mob, with a name,
# floating text above them and actions when clicked.
#
# Everything about single NPCs is set in-game with /npc and saved in npcs.yml.
# This file only holds the defaults. Apply changes with /npc reload.
#
# Quick start:
#   /npc create guide                    a player-like NPC where you stand
#   /npc skin guide Notch                give it a skin (any Minecraft account name)
#   /npc name guide <gold>Guide          change the name (colours allowed)
#   /npc hologram guide add &7Click me!  text above the name
#   /npc action guide add right message &aHello {player}!
#   /npc action guide add right command spawn      (runs /spawn as the player)
#   /npc action guide add right dialogue guide_welcome   (a conversation from dialogues.yml)
#   /npc help                            every command
#
# More things an NPC can do:
#   Actions that stop when a check fails ("value|message", the message is optional):
#     take_money 100|&cYou need $100      require_money 500
#     require_permission vip.perk|&cVIP only
#     require %player_level% >= 10|&cReach level 10 first
#     give_money 50       animate wave
#   Walking:   /npc path guide add (twice or more), then /npc path guide speed 1.5
#   Animation: /npc animate guide wave 6     (waves every 6 seconds)
#   Only some players see it:
#     /npc visibility guide permission vip.see
#     /npc visibility guide add %jpquests_completed_story_first_steps% == true
#   Floating text with placeholders is personal: /npc hologram guide add &7Hi {player}, you have %jpeconomy_balance_formatted%
#   (Placeholders from other plugins need PlaceholderAPI and their expansion.)
#
# Colours: &a codes, &#RRGGBB hex and MiniMessage (<gradient:#a:#b>...).

# Language of the messages: en (messages.yml), es, pt, fr or de (lang/<code>.yml).
# Your own language: copy a file in the lang folder to lang/<code>.yml, translate it
# and set its code here (for example it for lang/it.yml).
language: en

# Replace messages.yml with the new design when the plugin is updated.
# Your old file is kept as messages.old-vX.yml. false = never touch it.
auto-update-style: true

defaults:
  # Name given to new NPCs. {id} = the id typed in /npc create.
  name: '<gradient:#43C6AC:#F8FFAE><bold>{id}</bold></gradient>'
  # Skin given to new player-like NPCs (a Minecraft account name). '' = default skin.
  skin: ''

editor:
  # Sneak + right-click an NPC (with jpnpcs.admin) to open its editor. /npc edit <id> always works.
  sneak-right-click: true

look-at-players:
  # New NPCs turn their head towards the closest player.
  enabled-by-default: true
  # Blocks within which a player is noticed (change per NPC with /npc look <id> on <range>).
  default-range: 8
  # How often heads turn, in ticks (20 = 1 second). Lower = smoother, a bit more work.
  update-ticks: 2
  # Turn the head bit by bit like a real player, instead of snapping to the player.
  smooth: true
  # Degrees per tick the head turns while following someone.
  turn-speed: 12
  # How far the head turns before the body turns too (a real player can turn ~50).
  max-head-turn: 50

# NPCs can greet players who walk up to them: wave, nod, swing or sneak, and/or say a
# line. Set it per NPC in the editor (/npc edit <id>) or with
#   /npc greet <id> <none|wave|nod|swing|sneak> [message]
greeting:
  # Players closer than this are greeted (never further than the NPC's look range).
  range: 5

interaction:
  # Seconds before the same player can click the same NPC again (per NPC: /npc cooldown).
  default-cooldown-seconds: 1
  # false = only right-clicks run actions.
  left-click: true
  # Tell players to wait when they click during the cooldown.
  cooldown-message: false

holograms:
  # Distance (blocks) from which the text above NPCs is visible.
  view-range: 48
  # Text with {player} or %placeholders% is shown per player and refreshed this often (ticks).
  update-ticks: 40

walking:
  # Walking NPCs stop and look at players who come close, then walk on.
  stop-near-players: true
  stop-range: 3

dialogues:
  # Default pause between the lines an NPC says (20 ticks = 1 second).
  line-delay-ticks: 25
  # Minutes the answers stay clickable.
  answer-minutes: 5

sounds:
  enabled: true
  # Played when an NPC is clicked. Format: SOUND or SOUND:volume:pitch. '' = none.
  click: ''

hooks:
  # Fill PlaceholderAPI placeholders (%player_level%...) in NPC actions.
  placeholderapi: true

Support

Guides and the docs of every JP plugin are on the JP Plugins website. Questions, bugs or ideas? Join the JP Plugins Discord.

License

JPNpcs is free to use on any server, including servers that make money, but it is not open source. Don't reupload, sell or share modified copies of it. The full terms are in LICENSE.txt, which is also inside the jar.