Xray Venom

Develop a Man Hunt plugin for Paper Bukkit 1.20.1 that allows one player (the Hunter) to chase down multiple players (the Runners) with configurable game rules. Include features such as a countdown timer, customizable spawn points, a spectator mode for eliminated players, and options for power-ups to aid the Runners. Additionally, add permission nodes for different roles and a command system to start/manage the game easily.

Kodari AI
KodariSep 7 at 6:04 am 2
ManHuntManager
ManHuntManager is a comprehensive Paper Bukkit 1.20.1 plugin that orchestrates thrilling Man Hunt games. It enables one Hunter to pursue multiple Runners with a configurable countdown timer, customizable spawn points, and spectator mode for eliminated players. The plugin offers power-up options to aid Runners, including speed boosts, invisibility, and health regeneration. A robust command system allows easy game management with start, stop, and status commands. Permission nodes differentiate roles, ensuring only authorized players can control the game. The plugin features a GUI-based setup for configuring game rules, spawn points, and power-up availability, providing an immersive and customizable Man Hunt experience.
  1. Create the Gradle/Paper project metadata and configurable defaults.

  2. Add spawn/configuration and game-session management, including countdown, timer, tracking, eliminations, spectators, and runner power-ups.

  3. Add commands, tab completion, event listeners, permissions, and plugin registration.

Implemented the Paper 1.20.1 Man Hunt plugin from scratch.

Features included:

  • Hunter versus multiple Runners

  • Configurable countdown and game duration

  • Hunter compass tracking

  • Configurable Hunter, Runner, and Spectator spawn points

  • Spectator mode for eliminated Runners

  • Runner power-ups with configurable effects, intervals, and durations

  • Automatic win conditions:

    • Hunter wins when all Runners are eliminated

    • Runners win when the timer expires

  • Player quit and respawn handling

  • Commands:

    • /manhunt start <hunter> <runner> [runner ...]

    • /manhunt stop

    • /manhunt status

    • /manhunt setspawn <hunter|runner|spectator>

    • /manhunt spectate

  • Tab completion

  • Role-specific permission nodes

  • Gradle configuration for Java 17, Paper API 1.20.1, and XSeries

  • Default config.yml with configurable game rules and spawn locations

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
12 824
src/main/java/com/kodari/manhunt/ManHuntPlugin.java
package com.kodari.manhunt;

import com.kodari.manhunt.command.ManHuntCommand;
import com.kodari.manhunt.command.ManHuntTabCompleter;
import com.kodari.manhunt.game.GameManager;
import com.kodari.manhunt.listener.ManHuntListener;
import com.kodari.manhunt.spawn.SpawnManager;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class ManHuntPlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        saveDefaultConfig();

        SpawnManager spawnManager = new SpawnManager(this);
        GameManager gameManager = new GameManager(this, spawnManager);
        ManHuntCommand command = new ManHuntCommand(gameManager);

        getCommand("manhunt").setExecutor(command);
        getCommand("manhunt").setTabCompleter(new ManHuntTabCompleter());
        Bukkit.getPluginManager().registerEvents(new ManHuntListener(gameManager), this);
        getLogger().info("KodariManHunt enabled.");
    }
}