Hey everyone! This release is a big rework of the trader system: cleaner config, safer API usage on 1.21+, stock & limits built-in, and a shiny paginated GUI. Here’s what changed
✨ Highlights
New Offers GUI (SmartInvs) with 6×9 layout, pagination, and Prev/Next buttons.
Per-trader feature flags: enable or disable Offers, Stock, and Per-Player Limits per NPC.
Stock & Restock system with automatic timers and persistent runtime file.
Per-player purchase limits with timed resets.
Safer 1.21+ attribute handling (uses the new AttributeModifier.Builder when available; falls back safely on older APIs).
MiniMessage-style & & color formatting everywhere (titles, lore, messages). Optional PlaceholderAPI in player-facing text.
Item builder overhaul: model data, enchants, attributes, PDC tags, unbreakable, lore etc.
Vault economy support for costs/rewards, with graceful fallback if Vault isn’t present.
Optional confirmation GUI before purchases.
Legacy “single trade” path still supported if you don’t want per-offer GUI.
How players use it (examples)
Click an NPC → see a scrollable offers menu with item previews, costs, stock, and limits.
If enabled, they’ll get a confirmation screen before buying.
Offers can charge money, XP levels, and items, and can give items, money, and run commands.
Titles/lore support <green>, <bold>, <br> and classic &a, &l codes; PlaceholderAPI placeholders expand for the viewer.
npc-1:
display-name: "<gold><bold>Traveling Trader</bold></gold>" requireConfirmation: true
# show confirm GUI for any purchase (legacy & GUI) message: "<green>Trade complete!</green>" features:
enableOffers: true
# use the GUI with per-offer config enableStock: true
# track stock per offer enablePerPlayerLimits: true
# per-player limits
# Legacy single-trade path is still supported if enableOffers=false: requirements:
exp: 5
money: 250.0
items:
key1:
material: DIAMOND
amount: 2
modelId: 123
fail: "<red>You need 2 custom diamonds!</red>" commands:
- "console: give
%player% bread 1"
GUI offers
Code (YAML):
npc-1:
offers:
speed_boots:
title: "<yellow>Speedy Boots</yellow>" icon:
material: LEATHER_BOOTS
amount: 1
modelId: 10
lore: -
"<gray>Zoom zoom.</gray>" -
"<white>+Movement Speed</white>" # What it costs to buy cost:
money: 500.0
exp: 3
items:
- { material: FEATHER, amount
: 8
} # What the player receives gives:
items:
- material: LEATHER_BOOTS
amount: 1
name: "<aqua><bold>Speedy Boots</bold></aqua>" lore: -
"<gray>Run like the wind.</gray>" modelId: 10
unbreakable: true
enchants:
minecraft:depth_strider: 3
protection_fall: 2
# accepts namespaced or simple keys # attributes support amount/operation/slotGroup attributes:
generic.movement_speed:
amount: 0.05
operation: ADD_SCALAR
# ADD_NUMBER | ADD_SCALAR | MULTIPLY_SCALAR_1 slotGroup: FEET
# ANY/HAND/MAINHAND/OFFHAND/ARMOR/HEAD/CHEST/LEGS/FEET pdc:
myplugin:rarity: "rare"# arbitrary metadata on the item money: 0.0
commands:
- "console: playsound entity.player.levelup master
%player%" # Stock system (only used if features.enableStock=true) stock:
max: 20
initial: 10
restock:
amount: 2
interval_seconds: 900
# every 15 minutes # Per-player limits (only used if features.enablePerPlayerLimits=true) perPlayer:
limit: 2
reset_seconds: 86400
# resets daily
⚙️ Runtime persistence
The plugin writes trader_runtime.yml with current stock, last restock timestamps, and per-player counters.
You can delete it to reset all stock & limits (server will recreate it).
Compatibility & Safety
Minecraft/Spigot 1.21+: Uses AttributeModifier.Builder when available.
Older APIs: Safe reflective fallback to the old constructor (still works, even if deprecated).
Attributes & Enchants via Registry to avoid deprecated lookups.
Flexible namespaced keys: minecraft:generic.attack_damage, generic.attack_damage, or GENERIC_ATTACK_DAMAGE all work.
Admin Checklist (after updating)
Back up your current trader.yml and trader_runtime.yml.
Update trader.yml to the new structure (see examples above).
If you had hardcoded NPC names/holograms: ensure you use the plugin’s formatted name so <green> etc. don’t show literally.
Verify Vault is installed if you use money costs/rewards.
Test an offer with stock and per-player limit enabled.
Optional: delete trader_runtime.yml to start with fresh stock/limits.
Fixes & Improvements
Fixed titles showing literal <green> by consistently converting MiniMessage-style tags and & codes in both static and per-player contexts.
Replaced deprecated attribute APIs where possible; added compatibility fallback for older servers.
More robust parsing for EquipmentSlotGroup values (ANY, HAND, MAINHAND, OFFHAND, ARMOR, HEAD, CHEST, LEGS, FEET).
Cleaner error handling & optional debug logs.
Thanks Thanks for all the feedback and reports—this update was shaped by your suggestions. If you hit any issues, send your trader.yml and a short repro; I’ll jump on it!
- Fixed the rotate command it now persists
- Added the command /mnpc reloadanim you cna reload your npcs Easily
- Fixed the SqLite integration !
- Fixed lots of other issues
Who receives potions? The player who interacts with the NPC. Particles marked as oninteract are spawned at the NPC’s head (offset).
Usage Examples
Give Speed II for 10s on interact: /mnpc addeffect 12 potion SPEED 10 1
Spawn happy villager particles at ~head height on interact: /mnpc addeffect 12 particle oninteract VILLAGER_HAPPY 1.8
Add looped flame ring (handled by loop manager): /mnpc addeffect 12 particle looped FLAME 0.0
Clear all effects from NPC 12: /mnpc effect clear 12
Compatibility & Behavior Notes
Regular MythicMobs are unaffected. Only NPC-<id> wrappers get NPC flags and PDC tags.
Clearing effects stops future applications/particles but does not remove potions already on players (by default). You can optionally add a small block to strip active potions nearby if you want that behavior.
NPCListener and PotionInteractionListener coexist:
NPCListener still handles animations, command firing, and general interaction flow.
PotionInteractionListener focuses on giving potions and spawning “oninteract” particles, honoring effects.on-* config toggles.
ModeledNPCS (BETA v7.0) BIG UPDATE : PLS DELETE OLD MODELEDNPC FOLDER AND REGENERATE THE NEW ONE You can now use the
latest BETA build with the newest
Spigot,
MythicMobs, and
ModelEngine.
This is a
full recode focused on stability and speed in our tests it’s ~
10× lighter. ModeledNPCS now barely sips CPU.
✨ Highlights
Massive performance pass: less tick time, fewer allocations, smarter caching.
BetonQuest & Quests support updated to the latest.
Fixed MythicMobs scene despawns when ModeledNPCS is present.
Reworked reloads /mnpc reloadname
Reloads npcdata.yml
Safely despawns & respawns each NPC
Re-tags autoLook after respawn
Reapplies names after a short delay (prevents Mythic from overwriting)
Uses one unified hologram refresher (refreshHologramsForNpc) to avoid dupes
/mnpc reload
Merges disk → memory without nuking runtime fields (UUIDs, autoLook, etc.)
Reloads QuestDialog + ModeledNPCS configs
Holograms, safety & QoL
Centralized updates via HologramManager.upsertHologram(...)
Clean mass-removal by generic keys (name/trader/dialog)
Extra null checks & warnings when managers are absent
Keeps chunks alive during respawn
Restarts effects/animations after respawn
️ Click behavior + cooldowns (configurable) Choose left-click, right-click, or both — with a smart
left-click fallback (raytrace/aim cone) for tiny model hitboxes.
Code (YAML):
max_npc_ids: 1000
debug: true
limit:
adventurerNPC: 3
serializeDebug: false
npc:
autoRegisterOrphanedNPCs: false
interaction:
left: true
# run interaction on left-click/attack right: true
# run interaction on right-click/use left_fallback:
enabled: true
range: 5.5
# try 5.5–6.0 for bigger models angle_deg: 30.0
# try 25–35 for wider aim cone cooldowns:
command_ms: 3000
# per-PLAYER: block re-triggering commands interaction_ms: 500
# per-NPC: debounce double fires click_dedup_ms: 250
# de-dupe same-tick L+R for the same player+NPC useJsonStorage: true
️ Dialogs A new
“command fields” dialog mode is ready — rolling out
tomorrow (next build).
✨ Improved Rebinding Logic: NPCs that previously failed to bind due to null or stale UUIDs now use a delayed Bukkit.getEntity() fallback that searches nearby entities using PersistentDataContainer.
Entity Rebinding Confirmation: Logs now confirm entity rebinding with accurate UUID assignment: [SpawnNPC] Rebinding NPC ID 8 with UUID: ...
ModelEngine-Compatible: Rebinding and tag suppression for ArmorStands (ModelEngine models) now work reliably even after delayed spawn cycles.
Cleaned Up – Console Spam Reduction
Removed excessive “Could not find entity” warnings by:
Avoiding rebind attempts when entity is expected to spawn later.
Skipping hidden or permission-restricted NPCs in rebind tasks.
✅ Result: Much cleaner logs, better performance, and no false warning spam.
✅ Added UUID null check during spawnNPC() to prevent crashes:
java.lang.IllegalArgumentException: UUID id cannot be null
Improved fallback logic to scan nearby entities using:
World#getNearbyEntities()
rather than assuming the stored UUID is always valid.
If no entity is found, the system now logs a warning and skips gracefully, preventing plugin crashes and NPC misbehavior.
Summary This patch ensures that
NPCs with null or outdated UUIDs no longer cause fatal errors during spawn, and the system attempts recovery by
smartly relinking to entities based on their metadata.
Hey everyone!
We’re excited to announce the release of
ModeledNPCs version 6.0 — this update brings major improvements to the plugin’s performance and stability!
However, please
read carefully before updating:
⚠️
This version completely changes the saving system. We’ve moved from YAML to
JSON, which makes NPC data saving much faster and more reliable.
✅
What you need to do:
Delete your old ModeledNPCS folder
Remove the old .jar file
Upload the new v6.0 jar and restart the server
Why this is important: This update
fixes long-standing issues, including NPCs randomly disappearing for some players. It's a clean slate, but totally worth it!
New Commands: You can now control NPC behavior more easily:
/mnpc static <id> – Disable auto-look (NPC stays in place)
❗
Please note: We are officially
dropping support for all versions below 6.0.
If you’re using an older version, we strongly recommend upgrading to benefit from all the fixes and improvements.
If you choose to update to version 6.0, please note that this update changes the entire saving system.
You will need to delete all your existing ModeledNPC files and the old jar file, then place the new one on your server. This version uses JSON instead of YAML for saving and storing NPCs, resulting in a much smoother and more efficient experience.
->
Added command for making npcs static so now you have
/mnpc look <id> - enable auto look
/mnpc static <id> - disable auto look
[✔️ NPCs Not Loading] Fixed a critical issue where NPCs defined in npcdata.yml were not being loaded at startup if the world (spawn) was not yet initialized. → NPC loading now waits for the target world to be fully available.
[✔️ Empty NPC Load] Resolved an issue where the loader would silently skip loading even though npcdata.yml had valid NPCs. → Added clear debug logs to trace npcs section detection and entry processing.
[✔️ UUID Binding Failure] Improved reliability of UUID/entity binding by deferring auto-look tagging and name application until entity is fully spawned.
️ Improvements:
Added extensive debug logging → Includes checks for config keys, NPC section presence, per-NPC world state, and spawn success confirmation.
Auto world loader support → Automatically attempts to load missing worlds before skipping NPCs.
Better ID Pool Handling → Ensures clean reuse and tracking of available NPC IDs during initialization.
Modifies meganiamtion.yml to support on intereact animation and looping animation
Code (YAML):
# This file maps animations to specific NPCs by their ID. # Define animations per NPC using: # - looped_animation: animation that plays continuously # - interact_animation: animation that plays when the player interacts 1:
looped_animation: idle_loop
interact_animation: wave
2:
looped_animation: sit_loop
interact_animation: nod
3:
looped_animation: breathe
interact_animation: cheer
4:
looped_animation: look_around
interact_animation: point
5:
looped_animation: guard_idle
interact_animation: alert
# Add more NPCs below # Make sure animation names match your ModelEngine blueprints! # # Example: # 6: # looped_animation: idle # interact_animation: greet
Fixed Issues with NPC Not being removed Fixed issues with effects not being removed on npc removal Fixed Critical Bug on sudo command Fixed Hologram names not working Fixed hologram not showing back up on restart Fixed effects not showing bakc up on restart Fixed NPC TPS Issue Fixed error on startup Fixed Errors on naming Fixed error related to chat color Added command /mnpc reloadeffect and /mnpc reloadname
You can now configure custom display names for each NPC:
Code (YAML):
5:
name: "&eTrader Bob" height: 2.6
Names are now properly shown via holograms above NPCs on spawn and reload.
️ NPC Look-at-Player System
New feature: NPCs with autoLook: true will automatically rotate to face nearby players!
Runs every second and makes interactions feel more immersive.
Bug Fixes Critical NPE Fix on Startup and Chunk Load
Fixed:
csharp java.lang.NullPointerException: Cannot invoke "HandlerManager.get(Class)" because "this.handlerManager" is null ✅ Cause: NPCs were being spawned before QuestDialog was fully initialized. ✅ Fix: NPC spawning is now delayed by 1 second on chunk load to allow full system boot.
Multiple Removal Logs (NPC ID Repeating)
Issue: Repeated [INFO] Removed NPC ID: X spam in console.
Fixed duplicate NPC entity removal and improved entity cleanup during chunk load.
MythicMob & ModelEngine Initialization Order
Fixed order-sensitive issues where models or mobs wouldn't spawn due to missing blueprints/mobs during early startup.
Improvements
Improved logging and debug output for all NPC spawning/hologram operations.
Smarter hologram height fallback: DialogTree::getYHeight used if available, otherwise namedata.yml.
Enhanced orphaned NPC detection and cleanup for smoother reloads and fewer console warnings.