NPC Summon System
AI-controlled NPCs that can revive KO'd players and provide protection
System Overview
The NPC Summon System allows players to summon AI-controlled NPCs (Iron Golems) that can:
- Automatically revive KO'd players
- Follow and protect their summoner
- Attack hostile mobs (Protector type)
- Provide healing support (Healer type)
NPC Types
Golem (Standard)
Permission: reanimatemc.summon.use.golem
- Basic reanimator NPC
- Follows summoner
- Revives KO'd players
- 100 HP base health
Best for: General use, beginners
Healer (Medic)
Permission: reanimatemc.summon.use.healer
- Specialized in revival
- Same as Golem currently
- Future: Periodic healing
- 100 HP base health
Best for: Support roles, team gameplay
Protector (Tank)
Permission: reanimatemc.summon.use.protector
- Can revive like Golem
- Attacks hostile mobs
- 10 block aggro range
- 200 HP (double health)
Best for: Combat, exploration, defense
How to Use NPCs
Summon
Use /reanimatemc summon <type> to summon an NPC.
/rmc summon golem
/rmc summon healer
/rmc summon protector
Target Player
Optionally specify a player to revive:
/rmc summon healer Steve
NPC will pathfind to the target and revive them.
NPC Follows
NPC follows you automatically after summoning or completing a task.
Stays within 10 blocks, stops at 3 blocks distance.
Dismiss
Remove your NPCs when done:
/rmc dismiss all
View active NPCs with /rmc npcs
NPC Behavior
Following Behavior
- Distance > 10 blocks: NPC pathfinds towards owner
- Distance < 3 blocks: NPC stops moving
- Owner moves away: NPC resumes following
- Obstacles: Uses Minecraft pathfinding to navigate
Revival Behavior
- When target is specified, NPC pathfinds to KO'd player
- At distance < 3 blocks, NPC initiates revival
- Revival uses normal
koManager.revive()mechanics - After revival, NPC returns to following owner
- Particle effects: Hearts + enchantment sound
Combat Behavior (Protector Only)
- Scans for hostile mobs within 10 blocks
- Targets closest hostile mob
- Uses vanilla Iron Golem attack mechanics
- Returns to following after combat
- Higher health (200 HP) for survivability
Requirements & Restrictions
| Requirement | Default | Description |
|---|---|---|
| Base Permission | reanimatemc.summon |
Required for ANY summon command |
| Type Permission | reanimatemc.summon.use.<type> |
Specific permission for each NPC type |
| Cooldown | 300 seconds (5 min) | Time between summons (configurable) |
| Max Summons | 1 per player | Maximum active NPCs (configurable) |
| Item Cost | Disabled | Optional item requirement (configurable) |
Configuration
NPC System Settings
npc_summon:
enabled: true # Enable/disable system
max_summons_per_player: 1 # NPCs per player
summon_cooldown: 300 # Cooldown in seconds
offline_timeout: 300 # Time before NPC despawns if owner offline
require_item: false # Require item to summon
required_item: NETHER_STAR # Item required (if enabled)
item_to_summon_golem: GOLD_INGOT # Specific item for golem
Customization Tips
- Free summons:
require_item: false - Economy integration: Set
require_item: truewith expensive items - Multiple NPCs: Increase
max_summons_per_playerfor VIPs - Quick respawn: Reduce
summon_cooldownfor action servers - Persistent NPCs: Increase
offline_timeoutsignificantly
Use Cases & Scenarios
Emergency Revival
Scenario: Player is KO'd during combat far from teammates.
Solution:
1. Teammate uses:
/rmc summon healer KOPlayer
2. Healer pathfinds to KOPlayer
3. Automatic revival at distance
4. KOPlayer saved!
Cave Exploration
Scenario: Exploring dangerous caves with lots of mobs.
Solution:
1. Summon Protector:
/rmc summon protector
2. Protector follows you
3. Attacks hostile mobs
4. Provides backup safety
Team Raids
Scenario: Group raiding a dungeon or stronghold.
Solution:
1. Each player summons:
/rmc summon healer
2. Multiple healers follow
3. Auto-revive fallen members
4. Higher success rate
Technical Details
Implementation
Architecture: Native Bukkit/Paper implementation (no Citizens2 dependency)
Entity Type: Iron Golem with custom behaviors
AI: BukkitRunnable tasks for pathfinding and behavior
Persistence: NPCs are removed on server restart
Features
- Visual customization: Golden name tag with glow effect
- Summon ritual: Soul fire particles + beacon sound
- Auto-cleanup: Invalid NPCs removed every second
- Offline handling: NPCs despawn after timeout if owner disconnects
- Permission-based types: Fine-grained control per NPC type
Limitations
- Pathfinding: Uses vanilla mechanics (less smooth than Citizens2)
- Appearance: Limited to Iron Golem model
- Cross-world: Following may be imperfect across world boundaries
- No persistence: NPCs don't survive server restarts