ModeledNPCs: Ultimate NPC Plugin for MythicMobs & ModelEngine! Quests, Dialogues & Traders & more! icon

ModeledNPCs: Ultimate NPC Plugin for MythicMobs & ModelEngine! Quests, Dialogues & Traders & more! -----

"Unleash the Power of MythicMobs and ModelEngine—Bring Your NPCs to Life!"



Fixes
VERSION 7.2 Fixes
New
  • Potion/Particle interactions
    • Added a PotionInteractionListener that gives players potion effects and/or spawns “on interact” particles when they click your NPCs.

    • Two config switches:
      • effects.on-right-click (default true)

      • effects.on-left-click (default true)
  • Command: /mnpc addeffect
    • Attach effects to an NPC:
      • Particles on interact:
        /mnpc addeffect <id> particle <looped|oninteract> <PARTICLE_NAME> [yOffset]

      • Potions to player:
        /mnpc addeffect <id> potion <POTION_NAME> <seconds> [amplifier]
    • Also supports a compact “colon” syntax:
      /mnpc addeffect <id> particle:looped:ANGRY_VILLAGER[:yOffset]
      /mnpc addeffect <id> potion:SPEED:10[:1]
Changed
  • MythicMobs integration hardened
    • MythicMobsHandler#onMythicMobSpawn now only touches mobs named NPC-<id>.
      Regular MythicMobs (e.g. your skill) are left completely alone.

    • For NPC-<id> spawns we:
      • Tag with your PDC key (for protection/interaction)

      • Apply NPC safety flags (AI off, invulnerable, no-collide, invisible, no gravity)

      • Restore custom display names (with a short delayed re-assert to beat MM nameplate refresh)
  • Safer NPC protection
    • NPCProtectionListener now cancels damage only for entities that are your NPCs (checks PDC tag and containsNPC(id)).

    • Removed self-registration in the constructor to avoid double listener registration.

    • Runs at LOW priority and respects ignoreCancelled.
  • Effect management
    • /mnpc effect <clear|remove|reset|clearall> <id> wipes all stored effects (both potion & particle) for that NPC and refreshes loop tasks.

    • (Optional pattern) You can extend this to also strip already-applied potions from nearby players if desired.
  • Name/Spawn quality-of-life
    • Spawner & name handling avoid duplicate bodies, close Mythic nameplates when present, and preserve previously saved values.

    • Merges on /mnpc reload keep runtime fields intact.
Tab-Completion
  • Added rich tab-complete for /mnpc addeffect:
    • Step-by-step suggestions: <id> → particle|potion → looped|oninteract or potion list → particle names or durations → yOffset/amplifier.
  • /mnpc effect now completes clear and remove, then lists NPC IDs.
Fixes
  • Listener registration compile error: registering PotionInteractionListener now correctly passes a JavaPlugin (questDialog), e.g.
    Bukkit.getPluginManager().registerEvents(new PotionInteractionListener(npcManager), plugin);

  • NPCEffect API parity: code now uses NPCEffect#getDuration() (ticks) consistently (the previous call to getDurationTicks() was corrected).
Data & Formats
  • Stored effect format (NPCEffect)
    • effectType:
      • Bukkit potion name ("SPEED", "REGENERATION", …) or

      • Particle token: "particle:<looped|oninteract>:<PARTICLE_NAME>:<yOffset>"
    • duration: ticks (potion only; seconds * 20)

    • amplifier: integer level (potion only; default 0)
  • 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.
----------, Aug 18, 2025
Resource Information
Author:
----------
Total Downloads: 76
First Release: Dec 13, 2024
Last Update: Sep 9, 2025
Category: ---------------
All-Time Rating:
12 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings