reaper_17

Develop a plugin that spawns customizable NPCs in a designated area that roam randomly, simulating a bot-like behavior. The main player should receive a one-hit kill sword, allowing them to eliminate NPCs discreetly while avoiding detection. Include options for NPC spawn rates, movement patterns, and a configurable game timer to create an engaging gameplay experience.

Kodari AI
KodariMay 24 at 6:09 pm 20,516 (v2)

I’ll create a stealth assassination game plugin where players hunt NPCs while avoiding detection.

StealthHunter
An immersive stealth assassination game where players hunt roaming NPC targets in designated arenas. Features configurable NPC spawn rates, intelligent movement patterns, and detection mechanics where witnesses can spot your kills. Players receive a special one-hit kill weapon and must eliminate targets discreetly within a time limit. Includes customizable arenas, game timers, scoring system, and detailed configuration options for spawning and AI behavior.

Now I’ll create the remaining core files:


StealthHunter plugin created successfully!

Core features implemented:

  • Arena system with 3-point setup (pos1, pos2, spawn)

  • NPC spawning with configurable entity types, names, and health

  • Random movement AI with idle states and pathfinding

  • Detection mechanics with FOV-based witness system

  • One-hit assassin sword with custom item builder

  • Scoring system with stealth bonuses and detection penalties

  • Game timer with automatic spawn waves

  • Full configuration for all gameplay parameters

Commands: /stealth setarena|start|stop|join|leave|reload

reaper_17

the mc version is?

Kodari AI
KodariMay 24 at 6:16 pm 2,460 (v2)

The plugin is currently targeting Minecraft 1.21 with Java 21.

You can see this in:

  • build.gradle: spigot-api:1.21-R0.1-SNAPSHOT

  • plugin.yml: api-version: '1.21'

Would you like me to change it to a different Minecraft version? Popular options:

  • 1.8.8 (legacy PvP, widest compatibility)

  • 1.16.5 (stable, widely used)

  • 1.20.x (recent)

  • 1.21.x (latest - current setting)

Just let me know which version you need!

reaper_17

1.21.X where x is?

Kodari AI
KodariMay 24 at 6:19 pm 3,360 (v2)

The build.gradle uses 1.21-R0.1-SNAPSHOT, which covers all 1.21.X versions (1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, etc.).

Spigot uses the same API dependency (1.21-R0.1-SNAPSHOT) for all patch versions within 1.21, so your plugin will work on any 1.21.X server without needing to specify the exact patch number.

The plugin will run on:

  • ✅ 1.21

  • ✅ 1.21.1

  • ✅ 1.21.2

  • ✅ 1.21.3

  • ✅ 1.21.4 (latest as of December 2024)

The current setup is correct and compatible with the entire 1.21 series!

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
13 1,406
src/main/java/com/stealthhunter/StealthHunter.java
package com.stealthhunter;

import com.stealthhunter.commands.StealthCommand;
import com.stealthhunter.listeners.CombatListener;
import com.stealthhunter.listeners.PlayerListener;
import com.stealthhunter.managers.ConfigManager;
import com.stealthhunter.managers.GameManager;
import com.stealthhunter.managers.ItemManager;
import com.stealthhunter.managers.NPCManager;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class StealthHunter extends JavaPlugin {
    
    private ConfigManager configManager;
    private ItemManager itemManager;
    private NPCManager npcManager;
    private GameManager gameManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.configManager = new ConfigManager(this);
        this.itemManager = new ItemManager(this);
        this.npcManager = new NPCManager(this);
        this.gameManager = new GameManager(this);
        
        getCommand("stealth").setExecutor(new StealthCommand(this));
        
        Bukkit.getPluginManager().registerEvents(new CombatListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerListener(this), this);
        
        getLogger().info("StealthHunter has been enabled!");
    }
    
    @Override
    public void onDisable() {
        if (gameManager != null && gameManager.isGameRunning()) {
            gameManager.stopGame();
        }
        if (npcManager != null) {
            npcManager.removeAllNPCs();
        }
        getLogger().info("StealthHunter has been disabled!");
    }
}