ZenseiKraits

MASTER PROMPT: ZenseiStory Plugin for Minecraft Paper 1.21.11

Act as an expert Minecraft Paper plugin developer. Create a complete, functional Minecraft Java plugin named "ZenseiStory" for Minecraft 1.21.11 using Java 21, Gradle, and the official Paper API.

The plugin must recreate my SMP YouTube story using actual server-side mechanics, commands, events, rewards, custom abilities, and cinematic effects.

IMPORTANT: Do not create a Fabric mod. Create a Paper server plugin that builds into a working ".jar" file.

  1. Required Plugin Commands

Register the following commands using "/zstory" as the main command.

Main Commands

  • "/zstory help" — Show all available commands.
  • "/zstory start" — Start the story.
  • "/zstory pause" — Pause active story events and timers.
  • "/zstory resume" — Resume the story.
  • "/zstory stop" — Stop active events safely.
  • "/zstory status" — Display the current story stage.
  • "/zstory next" — Advance to the next story stage.
  • "/zstory reset" — Reset story progress after confirmation.
  • "/zstory reload" — Reload configuration files.
  • "/zstory skip <stage>" — Skip to a specified stage.

Button and Coordinates

  • "/zstory setbutton" — Save the targeted button location.
  • "/zstory setchest" — Save the chest location.
  • "/zstory reveal <player>" — Reveal the specified player's current coordinates.
  • "/zstory setfinal <world> <x> <y> <z>" — Set the final boss location.

Task Commands

  • "/zstory task start <id>" — Start a task.
  • "/zstory task complete <id>" — Complete a task after verifying its objective.
  • "/zstory task fail <id>" — Fail a task.
  • "/zstory task info <id>" — Display task information.
  • "/zstory task timer <id> <minutes>" — Set a task time limit.
  • "/zstory task assign <player> <id>" — Assign a task to a player.

Ability Commands

  • "/zstory ability list" — Show available abilities.
  • "/zstory ability give <player> <ability>" — Unlock an ability.
  • "/zstory ability revoke <player> <ability>" — Remove an ability.
  • "/zstory ability use <ability>" — Activate an unlocked ability.
  • "/zstory ability cooldown <player> <ability>" — Display its remaining cooldown.
  • "/zstory ability reset <player>" — Reset the player's ability progress.

Armor and Rewards

  • "/zstory armor give <player> <level>" — Give a configured armor upgrade.
  • "/zstory armor upgrade <player> <level>" — Apply an armor upgrade.
  • "/zstory reward give <player> <reward>" — Grant a configured reward.

NPC and Boss Events

  • "/zstory boss spawn" — Start the Unknown Player boss encounter.
  • "/zstory boss despawn" — Remove the event boss safely.
  • "/zstory boss sethealth <amount>" — Configure boss health.
  • "/zstory dialogue play <scene>" — Play a configured dialogue sequence.
  • "/zstory cutscene play <scene>" — Run a cinematic event.
  • "/zstory rescue <player>" — Mark a player as rescued after validating the event.
  • "/zstory revive <player>" — Revive an eligible player.
  • "/zstory ending play" — Play the ending sequence.

All administrative commands must have permission checks and tab completion. Normal players must not be able to grant rewards, manipulate tasks, or control the story.

  1. Mysterious Button Event

When the designated player presses the configured button:

  1. Read the player's real coordinates.
  2. Broadcast "WARNING! Coordinates Revealed."
  3. Broadcast the player's X, Y, and Z coordinates.
  4. Play warning sounds and particle effects.
  5. Trigger the Hunters encounter after a configurable delay.

Use Paper events to detect the button interaction. The "/zstory setbutton" command must save the targeted button location.

Example in-game effects may use:

"/title @a title {"text":"WARNING!","color":"red","bold":true}"

"/playsound minecraft:block.note_block.bell master @a"

The plugin must implement these effects through the Paper API where appropriate. The examples are references, not a replacement for the plugin's Java implementation.

  1. Task System

Implement these five story tasks.

Task 1: Kill Player_Rex

  • Time limit: 20 minutes.
  • Verify that the required target is defeated.
  • Reward: Armor Upgrade I and Speed Burst.

Task 2: Save Alex

  • Verify that Alex is successfully rescued.
  • Reward: Armor Upgrade II and Shadow Dash.

Task 3: Defeat the Strongest PvP Player

  • Allow an administrator to configure the target.
  • Reward: Armor Upgrade III and Damage Reflection.

Task 4: Save Three SMP Members

  • Track three distinct rescued players.
  • Reward: Armor Upgrade IV and Guardian Shield.

Task 5: Defeat the Warden Without Armor

  • Verify that the Warden is defeated by the task participant.
  • Verify that the participant is not wearing armor at the required time.
  • Reward: Armor Upgrade V and Rage Mode.

Every task must have a timer, objective tracking, completion message, failure message, and duplicate-reward protection.

  1. Custom Abilities

Implement these as real server-side mechanics.

Speed Burst: Temporarily increases movement speed.

Shadow Dash: Moves the player forward a configurable distance with collision and cooldown checks.

Damage Reflection: Reflects a configurable portion of eligible incoming damage without creating recursive damage loops.

Guardian Shield: Temporarily reduces incoming damage.

Rage Mode: Temporarily boosts configured combat attributes.

Guardian's Will: Unlocks during the final story event and provides a temporary power boost.

Each ability must have configurable duration, cooldown, particles, sounds, activation messages, and unlock requirements.

  1. Armor Upgrade System

Create five armor levels with configurable materials, enchantments, names, lore, and attributes.

When a task is completed, the plugin must grant the correct upgrade without accidentally deleting the player's existing equipment or inventory.

Prevent duplicate rewards and save progress across restarts.

  1. LivingLegend Story Event

Create a configurable LivingLegend helper character.

Play dialogue explaining:

  • Unknown Player defeated LivingLegend's teammate.
  • LivingLegend previously completed the tasks.
  • LivingLegend lost the final battle.
  • Unknown Player is looking for a replacement.
  • Zensei must end the cycle.

Support a real player acting as LivingLegend through admin-controlled event commands, or an NPC implementation with an appropriate dependency if necessary.

  1. Final Boss and Secret Ability

Set the default final coordinates to X: 9999, Y: 100, Z: -9999, with a configurable world.

Use "/zstory setfinal <world> <x> <y> <z>" to configure the destination.

The final encounter must include:

  • Unknown Player as the boss.
  • Kaizo's story prop or a decorative representation.
  • Captive SMP members.
  • The final choice between saving Kaizo and saving everyone else.
  • The hidden Guardian's Will ability.
  • A final boss fight and server-wide ending.

Display these messages during the secret ability sequence:

"Hidden Requirement Completed"

"Secret Ability Unlocked"

"Ability Name - Guardian's Will"

"Objective Updated - Defeat The Unknown Player"

When the boss is defeated, display:

"Final Task Completed"

"Cycle Destroyed"

"SMP Saved"

"All Members Revived"

Implement all dialogue, sound effects, titles, and particles using actual plugin code.

  1. Vanilla Commands and Plugin Commands

Use vanilla Minecraft commands only for simple effects when appropriate, for example:

"/title @a title {"text":"SMP SAVED","color":"gold","bold":true}"

"/playsound minecraft:entity.ender_dragon.growl master @a"

"/effect give @p minecraft:speed 5 1 true"

"/tp <player> <x> <y> <z>"

However, the finished plugin must use the Paper API for reliable event handling, persistent progress, cooldowns, objective verification, boss management, and rewards.

Do not depend on command blocks or manually executing dozens of commands to make the plugin work.

  1. Persistent Story Progress

Save:

  • Current story stage.
  • Completed tasks.
  • Player ability unlocks.
  • Armor upgrade levels.
  • Rescued players.
  • Active event state.
  • Relevant timers and cooldowns.

The story must survive server restarts without duplicating rewards or restarting completed events unexpectedly.

  1. Configuration

Provide editable configuration files for messages, tasks, coordinates, armor, abilities, boss health, timers, sounds, particles, dialogue, and rewards.

Use permission nodes such as:

  • "zensestory.admin"
  • "zensestory.story"
  • "zensestory.ability"

The actual plugin name and permission spelling must be consistent throughout the project.

  1. Deliverables

Provide the complete Java source code, Gradle build files, "plugin.yml", configuration files, installation instructions, command documentation, and the compiled "ZenseiStory-1.0.0.jar".

Build against the correct Paper 1.21.11 API. Fix compilation errors before delivering the project.

Do not provide pseudocode, fake implementations, or claims of testing that were not actually performed.

If any cinematic feature requires an NPC dependency or external resource pack, explain that requirement and provide the simplest functional alternative.

Kodari AI
KodariOct 9 at 4:48 pm 4
ZenseiStory
A Minecraft Paper plugin that recreates an SMP YouTube story through server-side mechanics. Features a multi-stage story system with commands for starting, pausing, resuming, and advancing through stages. Implements five timed tasks with objective tracking, custom abilities like Speed Burst and Shadow Dash, a five-level armor upgrade system, a mysterious button event that reveals player coordinates, a LivingLegend story character, and a final boss encounter with the Unknown Player. Includes persistent progress saving, configurable dialogue and cutscenes, boss management, and a secret Guardian's Will ability. All features are managed through the /zstory command with full permission checks and tab completion.
  1. Set up the Paper 1.21.11 / Java 21 Gradle plugin and editable configuration.

  2. Add persistent task, reward, armor, ability, boss, and story-event systems.

  3. Register /zstory, permissions, tab completion, and Paper event handling.

Created the ZenseiStory Paper plugin project with Gradle, plugin metadata, editable configuration, persistent task and ability progress, rewards and armor upgrades, story commands, and the button and boss events. Command and installation instructions are in README.md.

The cinematic uses configured LivingLegend dialogue and armor-stand representations for Kaizo and the captive members; the final choice is made by right-clicking one of those stands. No NPC plugin or resource pack is required.

I haven’t compiled or verified a jar here, so I can’t claim a tested ZenseiStory-1.0.0.jar. To build and download it in Kodari:

  1. Click Compile in the desktop top bar, or on phone tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. After a successful build, click Download for that build or Download ZenseiStory.jar in chat.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
README.md
settings.gradle
Code
11 1,626
src/main/java/com/kodari/zenseistory/ZenseiStory.java
package com.kodari.zenseistory;

import com.cryptomorin.xseries.particles.XParticle;
import com.cryptomorin.xseries.XSound;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.World;
import org.bukkit.block.Block;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.command.TabCompleter;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Entity;
import org.bukkit.entity.Mob;
import org.bukkit.entity.Player;
import org.bukkit.entity.Zombie;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDeathEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerInteractEntityEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.NamespacedKey;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

public final class ZenseiStory extends org.bukkit.plugin.java.JavaPlugin implements Listener, CommandExecutor, TabCompleter {
    private StoryStorage storage;
    private ArmorManager armorManager;
    private AbilityManager abilityManager;
    private TaskManager taskManager;
    private BossManager bossManager;
    private boolean paused;
    private final Map<String, Long> resetConfirmations = new ConcurrentHashMap<>();
    private NamespacedKey hunterKey;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        storage = new StoryStorage(this);
        if (!storage.data().contains("story.stage")) {
            storage.data().set("story.stage", getConfig().getInt("story.stage", 0));
            storage.save();
        }
        armorManager = new ArmorManager(this, storage);
        abilityManager = new AbilityManager(this, storage);
        taskManager = new TaskManager(this, storage, armorManager, abilityManager);
        bossManager = new BossManager(this, storage);
        hunterKey = new NamespacedKey(this, "story_hunter");
        paused = storage.data().getBoolean("story.paused", false);
        if (paused) {
            taskManager.pauseTimers();
            bossManager.setPaused(true);
            setHuntersPaused(true);
        }
        Bukkit.getPluginManager().registerEvents(this, this);
        if (getCommand("zstory") != null) {
            getCommand("zstory").setExecutor(this);
            getCommand("zstory").setTabCompleter(this);
        }
    }

    @Override
    public void onDisable() {
        if (storage != null) storage.save();
        if (bossManager != null) bossManager.shutdown();
    }

    public AbilityManager abilities() { return abilityManager; }
    public boolean isStoryPaused() { return paused; }

    public String prefix() {
        return color(getConfig().getString("messages.prefix", "&8[&bZenseiStory&8] "));
    }

    public String message(String key, String fallback) {
        return color(getConfig().getString("messages." + key, fallback));
    }

    @EventHandler
    public void onButtonPress(PlayerInteractEvent event) {
        if (event.getAction() != Action.RIGHT_CLICK_BLOCK || event.getClickedBlock() == null) return;
        if (!isConfiguredLocation("story.button-location", event.getClickedBlock().getLocation())) return;
        String designated = getConfig().getString("story.button-player", "Zensei");
        if (designated != null && !designated.isBlank() && !event.getPlayer().getName().equalsIgnoreCase(designated)) return;
        Player player = event.getPlayer();
        Location location = player.getLocation();
        Bukkit.broadcastMessage(color("&c&lWARNING! Coordinates Revealed."));
        Bukkit.broadcastMessage(color("&e" + player.getName() + " is at X: " + location.getBlockX()
                + ", Y: " + location.getBlockY() + ", Z: " + location.getBlockZ()));
        for (Player online : Bukkit.getOnlinePlayers()) {
            online.sendTitle(color("&c&lWARNING!"), color("&eCoordinates Revealed"), 5, 50, 15);
            XSound.matchXSound(getConfig().getString("story.button-warning-sound", "BLOCK_NOTE_BLOCK_BELL"))
                    .ifPresent(sound -> sound.play(online));
        }
        String particleName = getConfig().getString("story.button-warning-particle", "ELECTRIC_SPARK");
        XParticle.of(particleName).ifPresent(particle -> player.getWorld().spawnParticle(particle.get(), location, 80, 1, 1, 1, 0.1));
        scheduleHunters(player, Math.max(0, getConfig().getInt("story.button-hunters-delay-seconds", 8)));
    }

    @EventHandler
    public void onStoryPropClick(PlayerInteractEntityEvent event) {
        bossManager.handleChoice(event);
    }

    @EventHandler
    public void onPlayerDeath(PlayerDeathEvent event) {
        taskManager.onPlayerDeath(event);
    }

    @EventHandler
    public void onEntityDeath(EntityDeathEvent event) {
        taskManager.onEntityDeath(event);
        bossManager.onDeath(event);
    }

    @EventHandler
    public void onDamage(org.bukkit.event.entity.EntityDamageEvent event) {
        abilityManager.onDamage(event);
    }

    @EventHandler
    public void onJoin(PlayerJoinEvent event) {
        taskManager.checkPlayer(event.getPlayer());
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (args.length == 0 || args[0].equalsIgnoreCase("help")) {
            showHelp(sender);
            return true;
        }
        String root = args[0].toLowerCase(Locale.ROOT);
        if (root.equals("status")) {
            sender.sendMessage(prefix() + color("&eCurrent story stage: &f" + storage.data().getInt("story.stage"))
                    + (paused ? color(" &c(PAUSED)") : ""));
            return true;
        }
        if (root.equals("ability") && args.length >= 2 && args[1].equalsIgnoreCase("use")) {
            if (!(sender instanceof Player player)) return tell(sender, "Only a player can activate an ability.");
            if (!player.hasPermission("zensestory.ability")) return tell(sender, "You do not have permission.");
            if (args.length < 3) return tell(sender, "Usage: /zstory ability use <ability>");
            abilityManager.use(player, args[2]);
            return true;
        }
        if (root.equals("reveal")) {
            if (!sender.hasPermission("zensestory.story") && !sender.hasPermission("zensestory.admin")) return tell(sender, "You do not have permission.");
            if (args.length < 2) return tell(sender, "Usage: /zstory reveal <player>");
            Player target = Bukkit.getPlayerExact(args[1]);
            if (target == null) return tell(sender, "That player is not online.");
            Location loc = target.getLocation();
            Bukkit.broadcastMessage(color("&cWARNING! Coordinates Revealed."));
            Bukkit.broadcastMessage(color("&e" + target.getName() + " — X: " + loc.getBlockX() + " Y: " + loc.getBlockY() + " Z: " + loc.getBlockZ() + " (&7" + loc.getWorld().getName() + "&e)"));
            return true;
        }
        if (!sender.hasPermission("zensestory.admin")) return tell(sender, "You do not have permission.");
        switch (root) {
            case "start" -> {
                storage.data().set("story.stage", Math.max(1, storage.data().getInt("story.stage")));
                storage.save();
                Bukkit.broadcastMessage(prefix() + color("&aThe ZenseiStory has begun."));
            }
            case "pause" -> {
                paused = true;
                taskManager.pauseTimers();
                bossManager.setPaused(true);
                setHuntersPaused(true);
                storage.data().set("story.paused", true);
                storage.save();
                Bukkit.broadcastMessage(prefix() + color("&eStory events and task timers paused."));
            }
            case "resume" -> {
                paused = false;
                taskManager.resumeTimers();
                bossManager.setPaused(false);
                setHuntersPaused(false);
                storage.data().set("story.paused", false);
                storage.save();
                Bukkit.broadcastMessage(prefix() + color("&aStory resumed."));
            }
            case "stop" -> {
                paused = false;
                bossManager.despawn();
                Bukkit.broadcastMessage(prefix() + color("&cActive story encounter stopped safely."));
            }
            case "next" -> {