redz213

Stage 2: The Empowered Dragon

After the Ender Dragon is defeated, the End does not return to normal.

The exit portal remains dormant and no Dragon Egg appears.

An operator executes:

/stage 2

A server-wide message appears:

"The Dragon has fallen.

Yet the End remains bound to an ancient power.

The End remembers."

Immediately:

* All End Crystals are restored. * Obsidian pillars regenerate. * The exit portal is sealed beneath unbreakable bedrock. * Players cannot leave the End by any means. * End gateways are disabled. * Teleportation to other dimensions is blocked.

A new boss emerges above the portal:

EMPOWERED DRAGON

The Empowered Dragon is far stronger than the original dragon.

Stats:

* 500 HP (250 Hearts) * 2x normal Ender Dragon damage * Increased movement speed * Increased knockback * Increased dragon breath damage

The boss bar displays:

Empowered Dragon

The End remains locked until the Empowered Dragon is defeated.

Upon death, the dragon erupts into purple and amethyst particles.

A single item drops above the exit portal:

The Forgotten Book

Lore:

"The Forgotten Book

A story torn from memory.

Its pages speak of powers long sealed within the End."

When a player opens the book, they receive the prophecy:

"Before memories were wielded, they were written.

Before they were written, they were hidden.

The End was their prison.

You have broken the seal."

The End remains sealed until an operator executes:

/stage 2 end

When this command is used:

* The bedrock blocking the portal disappears. * The exit portal reactivates. * Players may leave the End. * End gateways reactivate. * The Dragon Egg finally appears above the portal. * A server-wide message is broadcast:

"The seal has been broken.

The Forgotten Book has been recovered.

A new chapter has begun."

Rewards:

* Dragon Egg * Forgotten Book

Make it so you can edit the contents of the forgotten book

Kodari AI
KodariJun 14 at 3:02 am 47
Stage2Plugin
A narrative boss-fight plugin that triggers a powerful second phase after the Ender Dragon is defeated. Operators use /stage 2 to spawn the Empowered Dragon (500HP, 2x damage, custom boss bar) and seal the End — blocking all portals, gateways, and dimension travel. On dragon death, a configurable Forgotten Book drops above the exit portal. /stage 2 end unseals the End, reveals the Dragon Egg, and broadcasts the finale. All book content is editable via config.yml and /stage reload.

Here’s the full plugin:


How it all fits together:

Action
What happens
/stage 2
Broadcasts the start message, restores End Crystals on pillars, seals the exit portal with bedrock, spawns
Empowered Dragon
(500 HP, 2× damage, purple boss bar)
Dragon dies
Natural drops suppressed; purple/amethyst particle burst fires;
Forgotten Book
drops above the portal
/stage 2 end
Removes the bedrock cap (exposing the portal), places the
Dragon Egg
, broadcasts the finale
/stage reload
Reloads
config.yml
— next book created will use updated title, author, lore, and pages

Editing the Forgotten Book — open config.yml and change anything under forgotten-book.pages (one list entry = one page, \n = line break), then run /stage reload. No restart needed.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
11 716
src/main/java/com/kodari/stage2/Stage2Plugin.java
package com.kodari.stage2;

import com.kodari.stage2.command.Stage2Command;
import com.kodari.stage2.config.ConfigManager;
import com.kodari.stage2.listener.DragonListener;
import com.kodari.stage2.listener.EndLockListener;
import com.kodari.stage2.manager.EmpoweredDragonManager;
import com.kodari.stage2.manager.EndLockManager;
import com.kodari.stage2.manager.ForgottenBookManager;
import lombok.Getter;
import lombok.Setter;
import org.bukkit.World;
import org.bukkit.plugin.java.JavaPlugin;

public class Stage2Plugin extends JavaPlugin {

    @Getter private ConfigManager configManager;
    @Getter private EndLockManager endLockManager;
    @Getter private EmpoweredDragonManager dragonManager;
    @Getter private ForgottenBookManager bookManager;

    @Getter @Setter private boolean stage2Active = false;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.configManager  = new ConfigManager(this);
        this.bookManager    = new ForgottenBookManager(this);
        this.endLockManager = new EndLockManager(this);
        this.dragonManager  = new EmpoweredDragonManager(this);

        getServer().getPluginManager().registerEvents(new DragonListener(this), this);
        getServer().getPluginManager().registerEvents(new EndLockListener(this), this);

        Stage2Command cmd = new Stage2Command(this);
        getCommand("stage").setExecutor(cmd);
        getCommand("stage").setTabCompleter(cmd);
    }

    /** Returns the first loaded End-environment world, or null if none exists. */
    public World getEndWorld() {
        return getServer().getWorlds().stream()
            .filter(w -> w.getEnvironment() == World.Environment.THE_END)
            .findFirst()
            .orElse(null);
    }
}