Lakatos Erik
📎 1 file 25,125 chars
📄
pasted-code-1794397771289.txt
txt 862 lines
▶
# Project: Assassinate – Complete Minecraft Plugin

## General Information

Create a fully functional Minecraft Paper plugin for **Minecraft 1.21.11**, using Java 21.

**Plugin name:** ProjectAssassinate  
**Main command:** `/Assassination`  
**Alternative command:** `/Assassinations`

The plugin will be used for a team-based Minecraft assassination event. It consists of an assassination system, team management, a point system, team chat, and three separate event modes.

IMPORTANT:
- Everything must work on Paper 1.21.11.
- Use Java 21.
- All features must be fully implemented, not just placeholders.
- Make sure there are no console errors, memory leaks, or major performance issues.
- All settings should be configurable.
- Save all important data persistently so restarting the server doesn't erase anything.
- Make sure all systems work together without interfering with each other.
- Do not use external plugins as dependencies unless absolutely necessary.
- Every command and feature must be tested for compatibility with the others.

---

# 1. TEAM SYSTEM

There are 6 teams:

1. **Redstone** – Red
2. **Lapis** – Dark Blue
3. **Gold** – Yellow
4. **Emerald** – Green
5. **Diamond** – Light Blue
6. **Amethyst** – Pink/Light Purple

### Team assignment

Command:

`/Assassination team set [Player] [Team]`

Examples:
- `/Assassination team set Steve Redstone`
- `/Assassination team set Alex Amethyst`

Only OP players can use this command.

Requirements:
- Players can only belong to one team at a time.
- Team assignments must be saved permanently.
- Players who join the server should retain their previously assigned team.
- Players without a team should not receive assassination targets.
- Team names should be case-insensitive when entered in commands.

### Tab list colors

When a player gets assigned to a team, their username in the TAB list should automatically change to their team's color.

Use these colors:

| Team | TAB color |
|---|---|
| Redstone | Dark Red |
| Lapis | Dark Blue |
| Gold | Gold/Yellow |
| Emerald | Green |
| Diamond | Aqua/Light Blue |
| Amethyst | Light Purple |

Make sure the colors update immediately when someone changes teams.

---

# 2. ASSASSINATION SYSTEM

This is the main feature of the plugin.

### Starting the assassination event

Command:

`/Assassination event start`

Only OP players can use it.

When an OP starts the event:

1. The assassination system becomes active.
2. Every eligible player receives one assassination target.
3. Each player's target name should appear prominently on their screen.
4. A locator bar should automatically activate and point towards their assigned target.
5. Every player should have their own individual target and locator bar.

For example:

- Player A gets Player B as their target.
- Player C gets Player D as their target.
- Player E gets Player F as their target.

Each player should ONLY see their own assigned target on their locator bar.

**IMPORTANT – LOCATOR BAR ANTI-HIDING SYSTEM:**

This is one of the most important requirements of the entire plugin.

A player who is being tracked MUST NOT be able to hide from their assassin.

There must be NO way to avoid being detected by the locator bar.

The locator system must ignore:
- Sneaking/crouching.
- Invisibility potions.
- Wearing mob heads.
- Wearing pumpkins.
- Any vanilla player-detection hiding mechanics.
- Any other vanilla mechanic that would normally prevent a player from appearing on the locator bar.

The tracking must work continuously, regardless of what the tracked player does.

Do not rely on vanilla player visibility or detection conditions if they allow players to hide. Implement a reliable tracking solution that consistently updates the locator bar for the assigned assassin.

If the native locator bar API cannot guarantee this behavior, implement a reliable alternative that provides the same visual tracking experience.

The target should never be able to disable or interfere with their assassin's tracking.

### Target assignment rules

- Players must NEVER receive someone from their own team as a target.
- Players should not receive themselves as targets.
- Only players who are participating in the event and have a team can be assigned.
- When possible, distribute targets evenly and avoid unnecessary duplicate assignments.
- If there are not enough eligible players to create valid assignments, do not assign invalid targets. Notify the OP.
- When a target disconnects, the assignment should remain saved until they return or an OP rerolls it.
- When someone is eliminated or permanently removed from the event, handle their assignment appropriately.

### Target display

Display the assigned target clearly on the player's screen.

For example:

`YOUR TARGET: PlayerName`

This should be visible when the event is active.

The target display should update immediately whenever a new target is assigned.

### Automatically rerolling targets

Whenever a player successfully kills their assigned target:

1. Award the appropriate points.
2. Remove their old target.
3. Automatically assign them a new eligible target.
4. Update their displayed target name.
5. Update their locator bar.

The new target must follow exactly the same assignment rules as the original target.

### Manually rerolling targets

Command:

`/Assassination target reroll [Player]`

Only OP players can use this command.

This should:
- Remove the player's current target.
- Generate a new valid target.
- Update their locator bar.
- Update their target display.

This command is particularly important if a player gets banned, leaves the event permanently, or otherwise becomes unavailable.

---

# 3. TEAM CHAT

Command:

`/tc [Message]`

This command should allow players to communicate exclusively with their own team.

Example:

`/tc Someone is approaching our base!`

Requirements:
- Only players on the same team can see the message.
- Players from other teams must NEVER see the message.
- Players without a team cannot use team chat.
- Display messages in a clear format.

Example:

`[TEAM] [Redstone] Steve: Someone is approaching our base!`

This is the only command that does not require OP permissions.

---

# 4. POINT SYSTEM

Every team starts with **10 points**.

The points should be saved permanently.

### Assassination points

When a player successfully kills their assigned assassination target:

- Their team gains 2 points.
- The eliminated target's team loses 2 points.

When a player is killed by someone who had them as their assigned assassination target:

- Their team loses 2 points.

Important:
- Do not apply the same death penalty twice.
- Teams cannot have negative points.
- The minimum amount of points is always 0.
- Normal kills that are not valid assassination kills should not award assassination points.
- Only count valid player kills, not environmental deaths.

### Setting team points

Command:

`/Assassination team points set [Team] [Points]`

Example:

`/Assassination team points set Redstone 50`

This sets the team's total points to 50.

### Adding and removing points

Commands:

`/Assassination team points add [Team] [Points]`

`/Assassination team points remove [Team] [Points]`

Examples:

`/Assassination team points add Lapis 10`

`/Assassination team points remove Gold 5`

Requirements:
- Points cannot go below 0.
- Invalid values should produce an error message.
- Only OP players can use these commands.

### Checking points

Command:

`/Points [Team]`

Examples:

`/Points Redstone`

Displays the selected team's points.

`/Points`

Displays the points of the player's own team.

Requirements:
- Available to ALL players, including non-OP players.
- If a player doesn't belong to a team and doesn't specify a team, display an appropriate message.
- Display the team name and its current points.

---

# 5. CAPTURE THE FLAG EVENT

This is the first additional event mode.

Each team has its own designated arena with a flag.

The objective is to steal another team's flag and successfully bring it back to your own team's arena.

### 5.1 Marking team arenas

Command:

`/Assassination event flag arena mark [Team]`

Example:

`/Assassination event flag arena mark Redstone`

The block the OP is standing on should be the CENTER of the arena.

Arena dimensions:
- 10x10 blocks horizontally.
- 3 blocks above the center height.
- 3 blocks below the center height.
- All edges should be visually marked using purple particles.

The particles should create a visible outline of the arena.

Requirements:
- Every team can have its own separately saved arena.
- Arenas must be saved between server restarts.
- The arena should be marked again if an OP uses the command to change its location.
- Players should be able to see the arena boundaries clearly.

### 5.2 Placing and removing flags

Commands:

`/Assassination event flag place [Team]`

`/Assassination event flag remove [Team]`

The flag should be placed on the block the OP is currently standing on.

Each team's flag must have a banner corresponding to its team color:

| Team | Banner |
|---|---|
| Redstone | Red Banner |
| Lapis | Blue Banner |
| Gold | Yellow Banner |
| Emerald | Green Banner |
| Diamond | Light Blue Banner |
| Amethyst | Pink Banner |

Requirements:
- Flags must be identifiable as special plugin items.
- Players must not be able to duplicate them.
- Players must not be able to move their own team's flag.
- Players cannot pick up their own team's flag.
- Only an OP can place or remove flags using commands.
- Flag locations must persist after restarts.

### 5.3 Stealing flags

Players can steal flags belonging to other teams.

When a player successfully steals a flag:
- The flag should become an item in their inventory.
- A locator bar should point towards the player carrying the flag.
- The locator bar should be visible to all relevant players.
- The carrier must remain trackable, regardless of sneaking, invisibility, mob heads, pumpkins, or other hiding mechanics.

**Picking up dropped flags:**

If a player attempts to pick up a dropped flag but has a full inventory, the flag should simply drop onto the ground.

Players must also be able to pick up dropped flags by SHIFT + RIGHT-CLICKING the dropped flag.

Make sure the interaction does not accidentally trigger normal item pickup or duplicate the flag.

### 5.4 Returning flags and scoring

If a player successfully brings an enemy flag into their own team's arena:

- Their team gains 3 points.
- The stolen flag is returned to its original team's base.
- The flag becomes available to steal again.

If a team's flag is successfully captured by an enemy team:

- The team whose flag was stolen loses 3 points.

A flag should only count as captured once.

Make sure the scoring system cannot be exploited by repeatedly dropping and picking up the same flag.

### 5.5 Announcing flag coordinates

Command:

`/Assassination event flag announce coords`

This should display the coordinates of all currently placed flags in chat.

Example:

`[Redstone] Flag: X: 100 Y: 65 Z: 200`

Display all six teams' flag coordinates, if their flags have been placed.

### 5.6 Starting and stopping Capture the Flag

Commands:

`/Assassination event flag start`

`/Assassination event flag stop`

Starting should activate the Capture the Flag mechanics.

Stopping should:
- Disable flag stealing and scoring.
- Remove flag carrier tracking.
- Return all flags to their original positions.
- Remove any temporary event effects.
- Preserve all team points.

---

# 6. SUPPLY DROP EVENT

The second additional event mode.

Supply drops will spawn around the map.

Every supply drop will have a locator bar pointing towards it.

The objective is to control a supply drop for 20 consecutive minutes.

### 6.1 Setting the amount of supply drops

Command:

`/Assassination event supplydrops set [Number]`

Example:

`/Assassination event supplydrops set 5`

This sets how many supply drops will spawn when the event starts.

Only OP players can use this command.

The number should be configurable and saved.

### 6.2 Starting supply drops

Command:

`/Assassination event supplydrops start`

When the event starts:

- Spawn the configured number of supply drops.
- Each supply drop should be represented by a barrel.
- Supply drops should spawn at valid ground locations.
- The barrel must be exposed to the sky.
- The barrel must be above Y level 60.
- Avoid placing barrels underwater, underground, inside blocks, or in inaccessible locations.

### 6.3 Supply drop arenas

Every supply drop should have its own arena.

Dimensions:
- 15x15 blocks horizontally in all directions, including diagonals.
- 5 blocks above the barrel's height.
- 5 blocks below the barrel's height.

The arena should have a visible RED particle outline.

The barrel should be positioned at the center.

The arena boundaries should be visible to nearby players.

### 6.4 Claiming supply drops

To claim a supply drop, at least ONE player from a team must remain inside its arena continuously for 20 minutes.

Requirements:
- It does not matter how many teammates are inside.
- One player is sufficient.
- If multiple teammates are inside, the timer continues normally.
- If every player from that team leaves the arena, the timer immediately resets to 0.
- Players from different teams must not contribute to the same team's timer.
- A supply drop can only be claimed by one team.
- Once a team successfully claims it, the supply drop disappears permanently.
- No other team can claim that supply drop afterward.

IMPORTANT:
The timer must reset if the controlling team has absolutely nobody inside its arena.

If a different team enters while the previous team's timer is running, their presence should not contribute to the previous team's progress.

### 6.5 Supply drop progress GUI

This is a very important feature.

When a team starts capturing a supply drop, EVERY player on that team should see the same progress timer.

Display a small GUI above the player's inventory (action bar area).

Example:

`[RED] Supply Drop 1: 12:34 / 20:00`

Requirements:
- The GUI should update continuously.
- It should show the remaining capture time.
- Every teammate should see the same timer.
- Players outside the arena should also see the team's progress.
- If the team loses control, the timer resets and everyone's GUI updates accordingly.
- When the supply drop is claimed, remove its GUI.

### Multiple supply drops

A team might be capturing multiple supply drops simultaneously.

In that situation:
- Display a separate timer for every supply drop.
- Use different colors for different supply drops.
- Make the timers easy to distinguish.
- All teammates should see every active timer for their team.
- Do not overwrite one timer with another.

If the action bar cannot display multiple timers clearly, implement a compact scoreboard-style display or another suitable small HUD above the inventory.

### 6.6 Claiming rewards

When a team successfully captures a supply drop:
- Remove the barrel.
- Remove the arena outline.
- Stop the timer.
- Remove the corresponding GUI from all teammates.
- Announce which team claimed it.

The reward system should be configurable so rewards can be added later.

### 6.7 Stopping supply drops

Command:

`/Assassination event supplydrops stop`

This should:
- Stop all active supply drop timers.
- Remove all active supply drop barrels.
- Remove all arena particle outlines.
- Remove all supply drop GUIs.
- Stop all supply drop tracking.
- Preserve team points.
- Clean up all temporary event data.

---

# 7. PROTECT THE PRESIDENT EVENT

The third additional event mode.

Each of the six teams will have one designated President.

The objective is to protect your own President while attempting to eliminate the Presidents of other teams.

### 7.1 Setting Presidents

Command:

`/Assassination event president set [Player]`

Example:

`/Assassination event president set Steve`

Requirements:
- Only OP players can use this command.
- A President must belong to a team.
- Each team can only have one President.
- If a new President is assigned to a team, replace the previous one.
- Save the assigned Presidents.

### 7.2 Starting the event

Command:

`/Assassination event president start`

When started:
- Activate the President event.
- Every President gets a locator bar pointing towards them.
- The locator bar should track the President until the event ends or they die.
- Tracking must work regardless of sneaking, invisibility, mob heads, pumpkins, or other hiding mechanics.

IMPORTANT:
Every player should be able to identify the location of the Presidents of the participating teams.

### 7.3 Killing a President

When a President gets killed by another team:

- The attacking team gains 3 BONUS points.
- The attacking team also receives the normal 2 assassination points if the kill qualifies as an assassination kill.
- The President's team loses the normal 2 assassination points if the kill qualifies as an assassination death.
- The President is marked as eliminated.
- Their locator bar tracking stops.
- Announce the elimination in chat.

Example:

`[PRESIDENT ELIMINATED] Redstone's President was eliminated by Lapis!`

The attacking team receives 3 additional points, meaning 5 total if the assassination kill also qualifies.

A President should only award the 3 bonus points once.

### 7.4 Stopping the event

Command:

`/Assassination event president stop`

This should:
- Stop President tracking.
- Remove temporary event effects.
- Stop the President event.
- Preserve all team points.
- Preserve the assigned Presidents for future use.

---

# 8. MAIN EVENT MANAGEMENT

### Stopping the entire assassination system

Command:

`/Assassination event stop`

Only OP players can use this command.

This should completely deactivate the main assassination system.

Requirements:
- Stop all assassination tracking.
- Disable assassination target displays.
- Disable assassination scoring.
- Remove temporary locator bars.
- Stop active event modes.
- Clean up temporary event GUIs and particle effects.
- Return carried flags and remove temporary supply drops where appropriate.
- Preserve team assignments.
- Preserve team points.
- Preserve all saved arena locations.
- Preserve President assignments.

### Restarting the event

Command:

`/Assassination event start`

When the event is restarted:
- Activate the assassination system again.
- Reroll all eligible players' assassination targets.
- Do NOT reset team points.
- Do NOT reset team assignments.
- Do NOT delete arena locations.
- Do NOT delete President assignments.
- Do NOT reset any other saved configuration.

Only assassination targets should be rerolled.

Make sure restarting the event does not create duplicate tasks, duplicate timers, or multiple locator bars.

---

# 9. COMPLETE COMMAND LIST AND PERMISSIONS

Every command below, EXCEPT `/tc` and `/Points`, must be restricted to OP players.

### Main commands

| Command | Description |
|---|---|
| `/Assassination event start` | Starts the assassination system |
| `/Assassination event stop` | Stops the entire assassination system |
| `/Assassination team set [Player] [Team]` | Assigns a player to a team |
| `/Assassination target reroll [Player]` | Rerolls a player's target |

### Point commands

| Command | Description |
|---|---|
| `/Assassination team points set [Team] [Points]` | Sets team points |
| `/Assassination team points add [Team] [Points]` | Adds team points |
| `/Assassination team points remove [Team] [Points]` | Removes team points |
| `/Points [Team]` | Checks team points |
| `/Points` | Checks own team's points |

### Team chat

| Command | Description |
|---|---|
| `/tc [Message]` | Sends a message to your team |

### Capture the Flag

| Command | Description |
|---|---|
| `/Assassination event flag arena mark [Team]` | Marks a team's arena |
| `/Assassination event flag place [Team]` | Places a team's flag |
| `/Assassination event flag remove [Team]` | Removes a team's flag |
| `/Assassination event flag announce coords` | Announces flag coordinates |
| `/Assassination event flag start` | Starts Capture the Flag |
| `/Assassination event flag stop` | Stops Capture the Flag |

### Supply Drops

| Command | Description |
|---|---|
| `/Assassination event supplydrops set [Number]` | Sets supply drop quantity |
| `/Assassination event supplydrops start` | Starts supply drops |
| `/Assassination event supplydrops stop` | Stops supply drops |

### Protect the President

| Command | Description |
|---|---|
| `/Assassination event president set [Player]` | Sets a team's President |
| `/Assassination event president start` | Starts President event |
| `/Assassination event president stop` | Stops President event |

All commands should have proper tab completion for subcommands, teams, and online player names.

Command aliases should work regardless of capitalization. Support both `/Assassination` and `/Assassinations` as command roots.

---

# 10. CONFIGURATION AND DATA STORAGE

Create a well-organized configuration system.

I want to be able to configure the following without modifying Java code:

- Starting team points (default: 10).
- Points awarded for assassination kills (default: 2).
- Points removed for assassination deaths (default: 2).
- Capture the Flag reward (default: 3).
- Capture the Flag penalty (default: 3).
- President elimination bonus (default: 3).
- Supply drop capture time (default: 20 minutes).
- Supply drop quantity.
- Supply drop arena dimensions.
- Capture the Flag arena dimensions.
- Team colors.
- Team banner materials.
- Target display messages.
- Event announcements.
- Particle colors and effects.
- Locator bar update settings.

Save all important information between server restarts.

Use an organized storage system, preferably YAML files or SQLite.

Separate the configuration into logical files if necessary, for example:

- `config.yml`
- `teams.yml`
- `points.yml`
- `targets.yml`
- `arenas.yml`
- `presidents.yml`

Make sure saving and loading work correctly.

---

# 11. IMPORTANT TECHNICAL REQUIREMENTS

Pay special attention to these points:

**1. Locator bars**

The locator bar is a core mechanic. Make sure it cannot be bypassed by sneaking, invisibility, armor, or other vanilla hiding mechanics. Test this specifically.

Each assassin should only have their own assigned target on their personal locator bar.

President and flag-carrier tracking should work independently from assassination tracking.

**2. Multiple event modes**

Make sure the assassination system, Capture the Flag, Supply Drops, and Protect the President can function without breaking each other.

If two or more event modes are active simultaneously:
- Their locator bars must work correctly.
- Their scoring must remain separate and accurate.
- Their timers must not interfere.
- Their GUIs must not overwrite each other.
- Stopping one mode must not accidentally stop another mode.

**3. Anti-exploit protection**

Prevent:
- Duplicate flags.
- Duplicate scoring.
- Repeated President rewards.
- Repeated supply drop rewards.
- Invalid assassination kills.
- Point manipulation by non-OP players.
- Players changing teams through unauthorized means.
- Players exploiting disconnects or reconnects to avoid event mechanics.

**4. Performance**

The plugin may be used on a server with multiple players.

Avoid unnecessarily checking every block or player every tick.

Use efficient scheduled tasks and properly cancel them when events stop.

**5. Player experience**

All important actions should have clear messages.

Examples:
- Target assigned.
- Target eliminated.
- New target received.
- Team points updated.
- Flag stolen.
- Flag captured.
- Supply drop claimed.
- President eliminated.
- Event started/stopped.

Use team colors in announcements wherever possible.

---

# 12. FINAL DEVELOPMENT INSTRUCTIONS

Before considering the plugin finished:

1. Compile the complete plugin successfully using Java 21.
2. Make sure the plugin loads on Paper 1.21.11.
3. Verify every command and its permission requirements.
4. Test target assignment with all six teams.
5. Test locator bars against sneaking, invisibility, and mob heads.
6. Test assassination scoring, including deaths and target rerolls.
7. Test flag stealing, returning, dropping, and inventory-full situations.
8. Test multiple simultaneous supply drops and their independent timers.
9. Test Presidents from all six teams.
10. Test stopping and restarting events without losing saved data.
11. Make sure there are no duplicate rewards, timers, or tracking tasks.
12. Fix all compilation errors and runtime errors before delivering the plugin.

**DELIVERABLES:**

I want the complete working Maven project, including:
- All Java source files.
- `plugin.yml`.
- `pom.xml`.
- All configuration files.
- Any required resource files.
- A compiled `.jar` file ready to put into my Paper 1.21.11 server's plugins folder.

Do not just provide examples, pseudocode, or incomplete classes.

Build the actual working plugin with every feature described above.
Kodari AI
KodariNov 11 at 11:58 am 5
AssassinateEventSuite
A comprehensive team-based Minecraft assassination event plugin for Paper 1.21.11 with six colored teams, persistent team assignments, and TAB list coloring. Features a full assassination system with unbypassable locator bar tracking that ignores sneaking, invisibility, and mob heads, plus automatic target rerolling on kills. Includes three additional event modes: Capture the Flag with persistent arenas and flags, Supply Drops with 20-minute capture timers and progress HUDs, and Protect the President with elimination bonuses. Provides team chat, a persistent point system with configurable rewards, and complete OP-only command management with tab completion.
  • Set up the Java 21 Maven/Paper project and configurable persistent storage.

  • Implement team/point management, assassination assignments, and per-viewer tracking.

  • Add flag, supply-drop, and president event managers with independent cleanup and scoring.

  • Register all commands, aliases, permissions, tab completion, and event listeners.

Created the Java 21 Maven project for Paper 1.21.11, including team assignment and chat, persistent points and targets, and the Capture the Flag, Supply Drop, and President event modes. Settings and saved data are in config.yml and separate YAML files.

Tracking uses separate live boss bars showing direction and distance, calculated from each target’s location rather than vanilla player-detection rules. Supply Drop progress appears in the action bar. I haven’t run live gameplay tests on a server.

To build and download the requested jar:

  1. On desktop, click Compile in the top bar; on phone, tap ⋮ → Compile Project.

  2. Click Compile in the window.

  3. When it succeeds, click Download on the build.

Lakatos Erik

also add a command to remove ppl from teams: /assassination team remove [user]

Kodari AI
KodariNov 11 at 12:21 pm 1
  • Add the OP-only /assassination team remove [user] subcommand and clear the player’s saved team assignment.

Added the OP-only /assassination team remove <user> command. It removes the saved team assignment, resets the online player’s TAB color, and updates any affected assassination targets; tab completion includes online players.

Lakatos Erik

For the supplydrop event, and the flag event, there arent outlines for the areas, where the outline of the areas is. and also for the supplydrop event, add a command: /assassination event supplydrops Range [number]: which sets the range of where the supply drops should be calculated from the coordinates: 0 0 0 (So if the number is 2000, there should be supply drops from -1000 to 1000

Kodari AI
KodariNov 11 at 12:29 pm 1
  1. Fix the flag and supply-drop arena outline rendering.

  2. Add /assassination event supplydrops range <number> with a symmetric -range/2 to +range/2 spawn range around (0,0,0), persisted in config and tab-completed.

Flag arenas now show a purple wireframe outline even when Capture the Flag isn’t active; active supply drops show red wireframe outlines.

Added /assassination event supplydrops range <number>. The range is saved in config.yml and sets the spawn bounds around X/Z 0 in the world where the event is started. For example, range 2000 spawns drops between -1000 and 1000 on each axis.

Lakatos Erik

Custom Ender Dragon Rework – Paper 1.21.11

General Information

I want you to completely rework the vanilla Ender Dragon into a custom boss fight.

Minecraft version: Paper 1.21.11 Java version: Java 21 Maximum Dragon Health: 800 HP

This should be a complete rework of the Ender Dragon's AI, movement, attacks, phases, and combat mechanics.

IMPORTANT GENERAL REQUIREMENTS:

  • Completely disable ALL vanilla Ender Dragon movement and attack behaviors for the custom boss.
  • The custom dragon must NEVER perch on the bedrock fountain.
  • Remove all vanilla dragon attacks and replace them with the attacks described below.
  • Implement completely custom movement AI.
  • Implement completely custom attack AI.
  • Movement types should automatically change every 2 minutes.
  • The dragon should have a custom boss bar displaying its name, current HP, and current phase.
  • Every phase must be clearly identified on the boss bar.
  • Display important warnings and damage restrictions below the boss bar.
  • Make sure all attacks have proper cooldowns to prevent spam.
  • Make all movements smooth, without teleporting or randomly glitching.
  • The dragon must remain inside the End dimension.
  • All mechanics must work in multiplayer.

VERY IMPORTANT – VANILLA DRAGON RESPAWNING:

When players respawn the Ender Dragon using the normal End Crystals mechanic, the dragon MUST be a completely normal vanilla Ender Dragon.

The custom boss mechanics should ONLY apply to dragons spawned using the custom plugin command.

This means:

  • End Crystal respawns must create a normal vanilla dragon.
  • End Crystal respawns must have normal vanilla HP and abilities.
  • End Crystal respawns must not have the custom 800 HP.
  • End Crystal respawns must not have custom movement types, attacks, or phases.
  • The plugin must distinguish between custom-spawned dragons and vanilla-respawned dragons.

Do NOT accidentally apply the custom AI to every Ender Dragon in the End dimension.

---

1. CUSTOM DRAGON SPAWNING AND COMMANDS

Create the following commands:

/Enderdragon spawn

Spawns the custom Ender Dragon.

Requirements:

  • Only OP players can use this command.
  • The dragon should spawn in the End dimension.
  • The dragon should have exactly 800 maximum HP.
  • The dragon should immediately activate Phase 1.
  • The dragon should immediately receive its custom boss bar.
  • The dragon should start its custom movement and attack systems.
  • Make sure only one custom dragon can be active at a time.

If a custom dragon is already alive, notify the OP instead of spawning another one.

/Enderdragon health add [Amount]

Adds the specified amount of current health to the custom dragon.

Example:

/Enderdragon health add 100

Requirements:

  • Only OP players can use it.
  • Cannot exceed the dragon's maximum health of 800.
  • Must work during the boss fight.

/Enderdragon health remove [Amount]

Removes the specified amount of current health from the custom dragon.

Example:

/Enderdragon health remove 100

Requirements:

  • Only OP players can use it.
  • Cannot reduce the dragon below 0 HP.
  • Must correctly trigger phase transitions if the health crosses a phase threshold.
  • If the health reaches 0, the dragon should die normally and the fight should end.

All commands should have tab completion.

---

2. PHASE SYSTEM AND BOSS BAR

The dragon has 4 phases, determined by its current health percentage.

| Phase | Health | |---|---| | Phase 1 | 100%–61% | | Phase 2 | 60%–20% | | Phase 3 | 19%–above 5% | | Phase 4 | 5%–0% |

Use the following HP thresholds with 800 maximum HP:

  • Phase 1: 800–489 HP.
  • Phase 2: 480–160 HP.
  • Phase 3: 152–48 HP.
  • Phase 4: 40 HP and below.

Use the percentage thresholds as the actual source of truth and ensure the transitions are seamless. Do not allow any HP ranges to accidentally leave the dragon without a phase.

Boss bar requirements

The boss bar must ALWAYS display the current phase.

Examples:

ENDER DRAGON | PHASE 1

ENDER DRAGON | PHASE 2

ENDER DRAGON | PHASE 3

ENDER DRAGON | PHASE 4

The boss bar must also:

  • Display the dragon's current health.
  • Display its health percentage.
  • Have a progress bar corresponding to its current HP.
  • Change color depending on the current phase.

Suggested colors:

  • Phase 1: Purple.
  • Phase 2: Blue.
  • Phase 3: Red.
  • Phase 4: Dark Red.

When the dragon enters a new phase:

  • Immediately update the boss bar.
  • Announce the phase transition to all players.
  • Cancel the previous phase's movement.
  • Cancel attacks belonging to the previous phase.
  • Reset the movement timer.
  • Activate the new phase's movement and attacks.

Make sure the boss bar never displays an incorrect phase.

---

3. SCREEN MESSAGES AND WARNINGS

This is an extremely important requirement.

There will be multiple messages displayed to players throughout the fight.

Examples include:

  • Invulnerability messages.
  • Arrow immunity messages.
  • Attack warnings.
  • Movement information.
  • Special movement instructions.

NONE OF THESE MESSAGES SHOULD OVERWRITE EACH OTHER.

Do not simply use the action bar for every message, because multiple messages may need to appear simultaneously.

Instead, create a dedicated HUD system below the boss bar.

Requirements:

  • The boss bar must remain at the top.
  • All additional messages should appear underneath it.
  • Multiple messages must be visible simultaneously.
  • Each message should have its own separate line.
  • Messages should have different colors depending on their importance.
  • Red should be used for urgent warnings.
  • Yellow should be used for general warnings.
  • White or gray should be used for information.
  • Messages should automatically disappear when they are no longer relevant.
  • If a warning and an invulnerability message are active simultaneously, BOTH must be visible.
  • Messages must not flicker or rapidly move around.
  • Do not overwrite Minecraft's normal action bar messages.
  • Make sure every player participating in the fight receives the correct messages.

If necessary, use a custom scoreboard-style HUD or another reliable implementation.

The HUD should update dynamically whenever the dragon changes movement type, phase, or attack state.

---

4. PHASE 1 – 100% TO 61% HP

Movement types

The dragon should randomly switch between these 3 movement types every 2 minutes.

Movement Type 1 – Island Circling

  • Circle the entire End island.
  • ONLY fly around the outer edges.
  • Stay approximately 20 blocks above the ground.
  • Continuously circle the island until the movement type changes.
  • Maintain a relatively consistent speed.

Movement Type 2 – Player Charging

  • Fly inside the End island.
  • Randomly gain altitude.
  • Charge towards players.
  • When hitting a player:

- Launch them approximately 40 blocks into the air. - Deal 9 damage.

  • Continue flying and prepare another charge.
  • Randomly select different players.

Movement Type 3 – Ground Rushing

  • Fly extremely close to the ground.
  • Move around the island very quickly.
  • When hitting a player:

- Deal 12 damage. - Knock them back approximately 5–10 blocks.

  • Continue rushing around the island.

Attack types

Attack 1 – Ground Shockwave

ONLY AVAILABLE DURING MOVEMENT TYPE 3.

  • Charge directly towards the ground.
  • Create a powerful shockwave upon impact.
  • Affect an area approximately 10–15 blocks around the impact.
  • Launch nearby players away.
  • Launch nearby blocks as part of the visual effect.
  • If a launched block hits a player, deal 12 damage.

Make the shockwave visually noticeable with particles and sound effects.

Attack 2 – Lightning Strike

AVAILABLE DURING ALL MOVEMENT TYPES.

  • When a player enters a 25-block radius, the dragon can target them with lightning.
  • Deal 8 damage.
  • Apply for 15 seconds:

- Blindness. - Slowness. - Weakness I.

Make the lightning visually clear.

Attack 3 – Dragon Fireballs

AVAILABLE DURING MOVEMENT TYPES 1 AND 3.

  • Shoot purple Ender Dragon fireballs towards the 3 closest players.
  • Each projectile should target a different player when possible.
  • Give the projectiles visible trails.
  • Make them reasonably dodgeable.

---

5. PHASE 2 – 60% TO 20% HP

The dragon becomes significantly more aggressive.

Movement types

Movement Type 1 – Obsidian Pillar Circling

  • Fly from one obsidian pillar to another.
  • Circle each pillar exactly once before moving to the next.
  • Continue this pattern around the island.

INVULNERABILITY:

While performing this movement type, arrows must NOT damage the dragon.

Display below the boss bar:

[Dragon can not be hurt with arrows during this phase]

Use a clearly visible warning color.

When the movement type changes, arrows should work normally again unless another movement type specifies otherwise.

Movement Type 2 – Vertical Diving

  • Repeatedly fly upwards and downwards.
  • When going downwards, descend towards a random location on the End island.
  • Do NOT always descend towards the central bedrock fountain.
  • Remain close to the ground and within melee range of players for approximately 10 seconds.
  • During this time, players should be able to attack with swords and bows.
  • After approximately 10 seconds, fly upwards again and repeat.

Movement Type 3 – Ground Hunting

  • Remain close to the ground.
  • Randomly move around the island, hunting players.
  • When hitting a player:

- Deal 15 damage. - Apply moderate knockback.

INVULNERABILITY:

While performing this movement type, the dragon cannot take ANY damage.

Display below the boss bar:

[Dragon can not be hurt during this phase]

Remove the message when the movement type changes.

Attack types

Remove all Phase 1 attacks from this phase.

Attack 1 – Purple Destruction Beams

ONLY AVAILABLE DURING MOVEMENT TYPE 1.

  • Shoot 10 purple beams.
  • They travel relatively slowly.
  • Their directions should be randomized rather than all targeting players.
  • Beams must travel through ordinary blocks.
  • Any block they hit should be destroyed without dropping items.

Exceptions:

  • Bedrock.
  • End portal blocks.
  • Protected blocks necessary for the End dimension.

The beams must be capable of destroying multiple blocks along their paths.

They should create holes and tunnels through terrain, including holes exposing the void.

Attack 2 – Vertical Player Launch

ONLY AVAILABLE DURING MOVEMENT TYPES 2 AND 3.

  • Select a player.
  • Charge directly towards them.
  • Upon hitting them:

- Launch them approximately 120 blocks vertically upwards. - Deal 10 damage.

  • The launch should be primarily vertical, NOT sideways.
  • Do not launch players off the island horizontally.

Attack 3 – Summoning Army

AVAILABLE DURING ALL MOVEMENT TYPES.

Summon mobs between 0 and 20 blocks from the dragon, on valid ground locations.

Summon:

  • 3–5 Endermen.

- Approximately the same size as a normal player. - Deal 9 damage to players.

  • 1–2 normal Wardens.
  • 2–3 Shulkers.

Requirements:

  • All mobs must be hostile towards players.
  • They must not attack the dragon.
  • All summoned mobs automatically despawn after 60 seconds.
  • They must be removed when the fight ends.

---

6. PHASE 3 – 19% TO ABOVE 5% HP

The dragon becomes more dangerous and introduces new mechanics.

Movement types

Movement Type 1 – Random Aerial Movement

  • Fly randomly around the island.
  • Move relatively quickly.
  • Vary altitude.
  • Do not remain in one location for too long.

INVULNERABILITY:

The dragon cannot take damage during this movement type.

Display:

[Dragon can not be hurt during this phase]

Movement Type 2 – 200-Block Ascension

  • Fly approximately 200 blocks above the End island.
  • Remain at that altitude.
  • Do NOT attack players.
  • Stay there until a player successfully damages it with a sword.

The ONLY way to make the dragon continue its movement and attack phases is to physically reach it and damage it with a sword.

Bows, crossbows, and other ranged attacks must NOT trigger this mechanic.

Display:

[Dragon will only continue its phases if it gets damaged, it's 200 blocks in the air, Good luck ;)]

Once a player successfully damages the dragon with a sword:

  1. End this special movement type.
  2. Resume the normal movement rotation.
  3. Allow Phase 3 attacks again.

Do not allow the dragon to leave this movement type due to automatic timers.

Movement Type 3 – Ground Dashing

  • Move close to the ground.
  • Normal movement speed should be approximately 50% slower than usual during this movement type.
  • Perform quick dashes approximately 15 blocks forward.
  • Randomly change directions between dashes.
  • Make dashes visually noticeable.

Attack types

Attack 1 – Triple Purple Beams

ONLY AVAILABLE DURING MOVEMENT TYPE 3.

  • Shoot 3 purple beams simultaneously.
  • All 3 beams must travel in different directions.
  • Their angles must be exactly 120 degrees apart.
  • Travel relatively slowly.
  • Have noticeable visual effects.
  • Players should be able to jump over them.
  • When a beam hits a player, deal 16 damage.

The beams should travel along the ground rather than high above players.

Attack 2 – Warden Pillar Assault

AVAILABLE DURING ALL MOVEMENT TYPES.

10 seconds before spawning Wardens, display in RED:

[WARNING: Get off the obsidian pillars]

After 10 seconds:

  • Spawn one Warden on EACH obsidian pillar.
  • Make them hostile towards players.
  • Remove them after 10 seconds.
  • Remove them even if they are still alive.

Attack 3 – Central Gravity Pull

AVAILABLE DURING ALL MOVEMENT TYPES.

5 seconds before the attack, display:

[WARNING: BLOCK YOURSELF IN]

Then:

  1. The dragon moves towards the central bedrock fountain.
  2. It positions itself at the center.
  3. Begin pulling nearby players towards the dragon.
  4. Pulling speed: approximately 2 blocks per second.
  5. Continue until the attack ends.

If a player physically touches the dragon:

  • Launch them approximately 150 blocks upwards.

The only way to prevent being pulled into the dragon is to completely block yourself in using blocks.

The pull must not pass through solid blocks.

Players who successfully block themselves in should not be pulled through their structures.

---

7. PHASE 4 – 5% TO 0% HP

The final stage of the fight.

The dragon becomes extremely aggressive and the island becomes dangerous.

Movement types

Movement Type 1 – High-Speed Aerial Movement

  • Fly extremely quickly around the End island.
  • Continuously change directions.
  • Remain airborne.
  • Do not stay in one location.

INVULNERABILITY:

The dragon cannot take ANY damage during this movement type.

Display:

[Dragon can not be hurt during this phase]

Movement Type 2 – High-Speed Ground Movement

  • Fly extremely close to the ground.
  • Move around the island very quickly.
  • Aggressively chase players.
  • Be vulnerable to damage during this movement type.

There are only 2 movement types during Phase 4.

Alternate between them every 2 minutes.

Attack types

Attack 1 – Red Targeting Beams

ONLY AVAILABLE DURING MOVEMENT TYPE 1.

  • Every 5 seconds, select a random player.
  • A red beam should target that player.
  • Show a visible warning/targeting effect before hitting.
  • When it hits:

- Deal 10 damage.

  • The attack should be dodgeable.

Make the red beam visually different from the purple beams.

Attack 2 – Shrinking End Island

20 seconds BEFORE the island starts shrinking, display:

[WARNING: GO AS CLOSE TO THE CENTER AS POSSIBLE]

After 20 seconds:

  • Remove 20 blocks of the island in every direction.
  • The island should become 20 blocks smaller from every outer edge.
  • Destroy affected blocks without dropping items.
  • Do not destroy the central bedrock fountain or portal.
  • Create a visible destruction effect around the shrinking boundary.

This attack should happen ONLY ONCE per fight.

Make sure players have the full 20 seconds to move towards the center.

---

8. MOVEMENT AND ATTACK MANAGEMENT

Movement switching

  • Each phase has its own available movement types.
  • Switch movement types every 2 minutes.
  • Select movement types randomly.
  • Avoid selecting the same movement type twice consecutively if other types are available.
  • Immediately stop the previous movement behavior when a new one begins.
  • Never allow two movement types to control the dragon simultaneously.

Exception: Phase 3 Movement Type 2 remains active until a player successfully damages the dragon with a sword.

Attack selection

  • Attacks should be selected independently from movement types.
  • Only allow attacks compatible with the current movement type.
  • Every attack must have its own cooldown.
  • Do not spam attacks.
  • Attacks must not interrupt important movement mechanics.
  • Never allow attacks belonging to previous phases.

Phase transitions

When a phase changes:

  1. Immediately cancel the previous phase's movement.
  2. Cancel attacks belonging to the previous phase.
  3. Remove outdated warnings.
  4. Reset the movement timer.
  5. Activate the new phase's movement types.
  6. Enable the new phase's attacks.
  7. Update the boss bar's phase label and color.
  8. Announce the new phase to all players.

Make sure transitions happen only once.

---

9. BOSS BAR AND HUD DETAILS

The boss bar should always show:

  • ENDER DRAGON.
  • Current phase number.
  • Current health.
  • Health percentage.
  • HP progress.

Example:

ENDER DRAGON | PHASE 2 | 450/800 HP

The boss bar color should change depending on the phase:

  • Phase 1: Purple.
  • Phase 2: Blue.
  • Phase 3: Red.
  • Phase 4: Dark Red.

Below the boss bar, display all active warnings and information using the dedicated HUD system described earlier.

Multiple messages must remain visible simultaneously.

Example:

ENDER DRAGON | PHASE 3

<red>WARNING: BLOCK YOURSELF IN</red>

<yellow>Dragon can not be hurt during this phase</yellow>

Do not let one message overwrite another.

---

10. VANILLA RESPAWNING AND CUSTOM DRAGON SEPARATION

This requirement is extremely important.

The custom dragon and vanilla dragon must be treated as two completely separate systems.

Custom dragon

Only spawned using:

/Enderdragon spawn

It receives:

  • 800 HP.
  • Custom boss bar.
  • Four custom phases.
  • Custom movement types.
  • Custom attacks.
  • Custom warnings.
  • Custom AI.

Vanilla dragon

Spawned through the normal End Crystal respawn mechanic.

It must retain:

  • Normal vanilla HP.
  • Normal vanilla movement.
  • Normal vanilla attacks.
  • Normal vanilla perching.
  • Normal vanilla AI.
  • Normal vanilla respawning behavior.

The plugin must NOT interfere with the vanilla dragon.

Do not globally cancel Ender Dragon events or damage mechanics in a way that affects vanilla dragons.

Use persistent entity identification or another reliable method to distinguish custom dragons from vanilla dragons.

---

11. BLOCK DESTRUCTION AND ARENA RESTORATION

Some attacks intentionally destroy the End island.

Requirements:

  • Track every block modified by the custom dragon.
  • Do not destroy bedrock, End portal blocks, or the central fountain.
  • Destroy blocks without dropping items.
  • Prevent accidental destruction outside the intended attack areas.
  • Provide a reliable way to restore the original arena after the fight.

When the fight ends, the plugin should be able to restore the original blocks destroyed by:

  • Purple Destruction Beams.
  • Shrinking End Island.

Do not restore blocks that players have legitimately changed unless they were specifically modified by the boss attack.

---

12. CONFIGURATION

Create a well-organized configuration system.

Make these values configurable:

  • Maximum dragon health (default: 800).
  • Movement switching interval (default: 120 seconds).
  • All attack cooldowns.
  • All damage values.
  • Knockback distances.
  • Projectile speeds.
  • Summoned mob quantities.
  • Warning durations.
  • Phase HP thresholds.
  • Arena destruction settings.
  • Boss bar colors.
  • Boss bar text.
  • HUD message formatting.

Use organized configuration files.

---

13. TECHNICAL REQUIREMENTS

  • Paper 1.21.11.
  • Java 21.
  • Maven project.
  • Completely override vanilla AI ONLY for custom dragons.
  • Prevent vanilla perching on custom dragons.
  • Prevent vanilla dragon attacks on custom dragons.
  • Prevent vanilla AI from interfering with custom movement.
  • Handle damage correctly.
  • Enforce all invulnerability rules.
  • Ensure arrows only damage the dragon when allowed.
  • Ensure Phase 3 Movement Type 2 only reacts to sword damage.
  • Prevent duplicate damage events.
  • Make all summoned mobs trackable and removable.
  • Clean up temporary entities, particles, tasks, and effects when the fight ends.
  • Avoid unnecessary repeating tasks.
  • Ensure the dragon cannot become permanently stuck.
  • Handle player disconnects and reconnects.
  • Ensure multiple players can participate simultaneously.

---

14. FINAL DELIVERABLES

I want the complete working Maven project, including:

  • All Java source files.
  • plugin.yml.
  • pom.xml.
  • Configuration files.
  • Any required resource files.
  • A compiled JAR ready for Paper 1.21.11.

Do not provide pseudocode, placeholder methods, or incomplete classes.

Compile the entire project and fix all errors before delivering it.

The final result should feel like a completely custom Minecraft boss fight, NOT the vanilla Ender Dragon with extra health.

MOST IMPORTANT PRIORITIES:

  1. Smooth custom dragon movement.
  2. Correct movement switching every 2 minutes.
  3. Completely disabled vanilla AI for custom dragons.
  4. All attacks working as described.
  5. Correct HP-based phase transitions.
  6. Exactly 800 maximum HP by default.
  7. Phase clearly displayed on the boss bar at all times.
  8. Multiple HUD messages visible without overwriting each other.
  9. Normal vanilla End Crystal respawning must remain completely untouched.
  10. Reliable multiplayer functionality.
Kodari AI
KodariNov 13 at 4:40 pm 5
  • Add an OP-only /Enderdragon command and keep custom-spawned dragons isolated from crystal-respawned vanilla dragons.

  • Implement the four health-based phases, smooth movement, attack cooldowns, damage rules, and stacked boss-bar HUD lines.

  • Add tracked mobs/projectiles, safe block destruction with persisted arena restoration, and lifecycle cleanup.

  • Register the manager, command, and configurable defaults in the existing Paper plugin.

Added the custom Ender Dragon system to the existing Paper plugin, with /Enderdragon spawn and /Enderdragon health add|remove. Custom dragons are identified separately, so vanilla Ender Crystal respawns aren’t given the custom mechanics. The implementation includes phase-based movement and attacks, damage restrictions, stacked HUD boss bars, and arena block restoration.

I haven’t verified the fight in a live Paper server. To compile and download the jar in Kodari:

  1. Click Compile on desktop, or ⋮ → Compile Project on phone.

  2. Click Compile in the window.

  3. After it succeeds, click Download on the build.

Lakatos Erik

The custom Ender Dragon is currently just standing still in the air instead of actually flying around the End island. Please fix the movement system.

Important requirements:

  1. The dragon must physically move through the world during every movement type. It must not remain stationary while only rotating, playing animations, or changing its head direction.
  2. Implement actual flight movement with continuously updated positions and velocity/pathfinding. The dragon should smoothly travel toward its next destination.
  3. Every movement type from the original configuration must work:

- Circle the outer edges of the island. - Fly inside the island and charge at players. - Fly quickly in circles close to the ground. - Visit and circle the obsidian pillars. - Move up and down, then descend to random locations around the island. - Hunt players near the ground. - Fly randomly around the island. - Rise 200 blocks into the air. - Perform low-altitude dashes. - Fly quickly around the island during Phase 4.

  1. Movement must change according to the current phase and selected movement type. The dragon should switch movement types every 2 minutes, as originally requested.
  2. The dragon must continuously select new destinations instead of reaching one location and getting stuck there.
  3. Make sure the movement system does not conflict with the dragon's attacks, damage handling, or phase transitions.
  4. If the dragon gets stuck, cannot reach a destination, or stops moving, automatically calculate a new destination and resume movement.
  5. Test every movement type individually and verify that the dragon actually travels around the End island.

Technical requirement: Do not rely on vanilla Ender Dragon AI or simply teleport the dragon repeatedly. Implement smooth, controlled movement that works reliably on Paper 1.21.11 with Java 21.

Do not remove or simplify any of the existing phases, attacks, damage values, or other mechanics. Fix the movement while preserving the entire original boss fight.

Kodari AI
KodariNov 13 at 4:54 pm 2
  • Remove the forced HOVER phase that pins the custom dragon in place.

  • Keep AI disabled and preserve each existing movement type, using smoothed velocity toward its live destination.

  • Add a movement watchdog to refresh stalled routes and restore forward velocity without teleporting.

Removed the forced HOVER phase, which was holding the custom dragon stationary, while keeping vanilla AI disabled. The existing movement types now steer with smoothed velocity toward their destinations; a watchdog refreshes stalled routes and reapplies forward velocity without teleporting. The two-minute movement switching and phase-specific attacks remain intact.

I couldn’t verify each movement type in a live Paper server here.

Lakatos Erik

It wasnt the hover phases, fault, revert everything u did, and fix it, it still doesn't work

Kodari AI
KodariNov 13 at 4:58 pm 2
  1. Remove the previous stall-watchdog changes.

  2. Enable the dragon’s actual flight tick and lock only this custom dragon to the non-perching, non-attacking CIRCLING phase; keep the existing custom movement targets and attacks.

The actual blocker was setAI(false)—it disabled the dragon’s movement tick, so changing its velocity didn’t make it travel. I removed the previous stall-watchdog changes, enabled flight for the custom dragon, and locked only that dragon to CIRCLING to prevent perching and vanilla attack phases. The existing movement targets and attack logic remain in place; vanilla respawned dragons are unaffected.

I couldn’t verify the movement in a live Paper server here.

Lakatos Erik

Make the enderdragon NEVER go above y level 125, except for the ability that makes it fly really high

Kodari AI
KodariNov 13 at 5:01 pm 1
  1. Cap every normal movement destination and upward velocity at Y=125.

  2. Keep the high-altitude exception only for the locked Phase 3 ascension.

  3. Add a small corrective clamp if the dragon’s vanilla flight tick overshoots the ceiling.

Normal movement is now capped at Y=125, including destinations and upward velocity, with a corrective clamp if flight overshoots. The only exception is the locked Phase 3 high-altitude ascension; the cap applies again as soon as that movement ends.

Lakatos Erik

Make it go the direction its looking, so it wont look weird going backwards, also make it regenerate 1 heart every 8 second instead of the regular 1

Kodari AI
KodariNov 13 at 5:04 pm 1
  • Align the dragon’s facing with its actual smoothed travel velocity, so its body doesn’t face one way while drifting another.

  • Add controlled healing of 2 HP (one heart) every 8 seconds and suppress vanilla healing on this custom dragon so the interval stays consistent.

The custom dragon now turns to face its smoothed movement direction, avoiding the appearance of flying backwards. It also regenerates 2 HP (one heart) every 8 seconds; vanilla healing is suppressed for the custom dragon so it won’t heal at a different rate. Both regeneration settings are in config.yml.

Lakatos Erik

its still flying backwards, fix that

Kodari AI
KodariNov 13 at 5:06 pm 1
  • Correct the Ender Dragon model’s forward-axis offset.

  • Derive yaw and pitch from the inverted travel vector so its visible facing matches its flight direction.

Reversed the facing vector used for the dragon’s yaw and pitch. The Ender Dragon model’s forward axis is opposite the standard entity convention, so its visible facing should now match its travel direction.

Lakatos Erik

Whenever it switches phases, theres a chance, it just starts randomly spinning, fix that and also make each movement type last 30 secs instead of the 2 minutes

Kodari AI
KodariNov 14 at 11:50 am 1
  1. Stabilize dragon yaw/pitch across phase and movement changes to prevent spin.

  2. Change the movement rotation interval from 2 minutes to 30 seconds while preserving phase-specific exceptions.

Stabilized facing across phase and movement changes: yaw now takes the shortest turn path, avoids recalculating when the dragon is nearly vertical, and smooths pitch changes. Movement types now switch every 30 seconds, regardless of an older saved config value.

Lakatos Erik

Remove its regeneration, and make the fireball have particles

Kodari AI
KodariNov 14 at 11:54 am 1
  1. Remove custom-dragon regeneration and its config settings.

  2. Add a visible particle trail to the existing dragon fireballs.

Removed custom regeneration and kept vanilla healing suppressed, so the custom dragon no longer regenerates health. Dragon fireballs now emit a continuous Dragon’s Breath particle trail.

Lakatos Erik

There are some issues: the shockwave ability doesnt work When the dragon spawns in mobs, they dont despawn New Ability: Aerial Divebomb

Add a new attack to the custom Ender Dragon:

  1. Takeoff: The dragon flies high into the air, gaining enough altitude to clearly prepare for a dive.
  2. Targeting: It selects a nearby player and briefly aims toward their location.
  3. Divebomb: The dragon rapidly dives toward the targeted player, following their position.
  4. Impact: When the dragon reaches the ground or the target's location:

- Deal 12 damage to the targeted player. - Launch the player approximately 10 blocks away with strong knockback. - Create a visible impact effect with particles and sound.

  1. Recovery: After impact, the dragon smoothly returns to its normal movement system and continues its current movement pattern.

Additional requirements:

  • The attack must have a clear visual warning so players can react.
  • It must work during the custom dragon fight without interrupting phase transitions.
  • The dragon must physically fly upward and dive downward, not teleport.
  • Make sure the attack works reliably on Paper 1.21.11 with Java 21.
  • Add a configurable cooldown and damage value to the config.
  • Do not replace or remove any existing attacks or movement types.
Kodari AI
KodariNov 14 at 12:04 pm 3
  1. Make shockwaves a visible ground dive with a reliable impact location.

  2. Ensure summoned mobs are removed by a dedicated expiry task and on fight cleanup.

  3. Add a configurable aerial divebomb with warning, tracking, impact damage/knockback, and phase-safe cancellation.

Fixed the ground shockwave so the dragon dives toward a valid ground impact point, then creates the damage, knockback, particles, and sound effect there. Summoned mobs now have a scheduled removal as well as the fight-cleanup removal.

Added the aerial divebomb with takeoff, a targeting warning, a player-tracking dive, and impact effects. Its cooldown and damage are configurable in config.yml (defaults: 60 seconds and 12 damage). Phase changes cancel the attack cleanly. I haven’t tested these mechanics in a live Paper server.

Lakatos Erik
📎 1 file 5,131 chars
📄
pasted-code-1794657919753.txt
txt 98 lines
▶
# Add 2 New Custom Attacks to Every Ender Dragon Phase

Add **two completely new attacks to each of the four phases** of the custom Ender Dragon fight.

Do not replace, remove, or modify any existing attacks. Keep the existing Divebomb ability as well.

## PHASE 1 — 100–61% HP

### Attack 1: Dragon's Wrath
- The dragon flies above the center of the island.
- It charges up for 3 seconds, with increasingly intense purple particles surrounding it.
- It then releases 5 consecutive shockwaves toward random players.
- Each shockwave travels along the ground.
- Players hit take 6 damage and receive approximately 5 blocks of knockback.
- Players can jump over the shockwaves to avoid them.
- The shockwaves must be clearly visible.

### Attack 2: Explosive Dragonfire
- The dragon selects the 3 closest players.
- It launches a purple fireball toward each selected player.
- When a fireball hits the ground or a block, it creates a small explosion.
- Players within the explosion radius take 8 damage and receive approximately 6 blocks of knockback.
- The explosions must not destroy blocks.
- The fireballs should have a visible purple trail.
- Give players a short warning before the fireballs land.

## PHASE 2 — 60–20% HP

### Attack 1: Void Rain
- The dragon flies high above the island.
- It marks 5 random locations on the ground with dark purple particles.
- Players receive a 3-second warning before the marked locations are struck.
- Purple energy beams fall from the sky onto those locations.
- Each impact deals 10 damage and launches nearby players approximately 8 blocks away.
- The beams must be visible and avoid the central bedrock fountain and End portal.
- No blocks should be destroyed.

### Attack 2: Dragon's Prison
- The dragon selects up to 3 nearby players.
- Purple particles appear in a circle around each selected player.
- After 2 seconds, temporary obsidian-like barriers rise around them, trapping them in a small arena.
- The barriers last 8 seconds and then disappear.
- Players can still fight and move inside the temporary arena.
- The barriers must never trap players permanently or interfere with the central End portal.
- If a player dies or disconnects, their barriers should immediately disappear.

## PHASE 3 — 19–5% HP

### Attack 1: Shadow Clones
- The dragon creates 3 purple copies of itself.
- The copies fly around the island and occasionally dive toward nearby players.
- Only the real dragon can take damage.
- When a clone reaches a player, it disappears in a purple explosion.
- The explosion deals 8 damage and approximately 6 blocks of knockback.
- Clones disappear after 20 seconds if they have not hit anyone.
- Make the real dragon visually distinguishable from the clones.

### Attack 2: Void Collapse
- The dragon flies toward the center of the island.
- It begins charging a powerful attack for 5 seconds.
- A large circular purple warning zone appears on the ground and gradually expands.
- When the charge finishes, the area erupts with purple energy.
- Players inside the warning zone take 14 damage and are launched approximately 12 blocks upward.
- Players outside the warning zone are unaffected.
- The attack must not destroy the central fountain, bedrock, or End portal.

## PHASE 4 — 5–0% HP

### Attack 1: Dragon's Last Stand
- The dragon stops its current movement briefly and begins charging for 4 seconds.
- Red particles and lightning surround its body.
- It then performs 3 extremely fast consecutive charges toward random players.
- Each charge deals 10 damage and approximately 10 blocks of knockback.
- The dragon must physically move during each charge, not teleport.
- Give players a visible warning before each charge.
- After the third charge, the dragon returns to its normal Phase 4 movement.

### Attack 2: Meteor Storm
- The dragon flies high above the island.
- It summons 8 red-purple meteors that fall toward random locations around the island.
- Each meteor has a visible falling particle trail.
- A red warning circle appears on the ground 3 seconds before impact.
- Each impact deals 12 damage and launches nearby players approximately 10 blocks away.
- Meteors must not destroy blocks.
- Do not allow meteors to target the central bedrock fountain or End portal.

## GENERAL REQUIREMENTS
- All 8 attacks must be fully implemented, not just visual effects.
- Add configurable cooldowns, damage, knockback, particle effects, and warning durations to the config.
- Make sure attacks do not overlap in a way that makes the fight impossible to play.
- Do not start an attack while another attack is still executing.
- All attacks must work with the existing custom movement system.
- Do not allow attacks to interrupt phase transitions.
- Make sure the dragon resumes its normal movement after every attack.
- All temporary entities, particles, barriers, and effects must be properly cleaned up when the fight ends or the dragon dies.
- Test all 8 attacks individually on Paper 1.21.11 with Java 21.

**IMPORTANT:** Preserve every existing attack, including the Aerial Divebomb. These are additions to the existing boss fight, not replacements.
Kodari AI
KodariNov 14 at 12:09 pm 3
  • Add two phase-specific attacks per phase without removing existing attacks or the divebomb.

  • Run them as exclusive, tick-driven sequences so movement, warnings, impacts, and cleanup stay phase-safe.

  • Add configurable cooldowns, damage, knockback, warning times, and particle choices; clean up prisons and clones on phase changes, player exits, or fight end.

Added all eight phase-specific attacks while preserving the existing attacks and Aerial Divebomb. The new attacks use exclusive, phase-aware sequences; include configurable cooldowns, damage, knockback, warning times, and particle effects; and clean up temporary clones and prison barriers when needed.

I couldn’t verify the attacks in a live Paper 1.21.11 server.

Lakatos Erik

in the attack: dragons wraith, nothing except the flying still above the end fountain works, fix that please

Kodari AI
KodariNov 14 at 12:15 pm 1
  • Make each Wrath wave a clearly visible ground-level wavefront.

  • Use swept collision checks against grounded players so the wave can’t skip past them between ticks, while jumping still avoids it.

Fixed Dragon’s Wrath: its shockwaves now render as a visible ground-level front, have enough travel time to reach distant targets, and use swept collision checks so grounded players are reliably hit while jumping can still avoid them. I couldn’t verify the change in a live Paper server.

Lakatos Erik

make the knockback taken from divebomb only 5 blocks

Kodari AI
KodariNov 14 at 12:16 pm 1
  • Reduce only the divebomb’s horizontal knockback to an approximately 5-block launch.

  • Keep its vertical lift, damage, and all other attacks unchanged.

Reduced the divebomb’s horizontal knockback to an approximately 5-block launch. Damage, vertical lift, and other attacks are unchanged.

[Generation stopped]

Lakatos Erik

The bossbar doesnt update, when damaged the dragon fix that

Kodari AI
KodariNov 14 at 12:20 pm 1
  • Refresh the custom boss bar after each accepted damage event, once health has been applied.

  • Keep a per-tick refresh as a fallback so the bar stays synchronized even for damage sources that bypass the event hook.

Fixed the custom dragon boss bar: it now refreshes every tick and updates again immediately after accepted damage is applied, keeping its health and percentage current.

Lakatos Erik

Remove the purple energy ability

Kodari AI
KodariNov 14 at 12:23 pm 1
  • Remove the Phase 3 Void Collapse attack from attack selection and its execution, movement, and warning logic.

  • Remove its unused configuration entries; leave all other attacks unchanged.

Removed the Phase 3 Void Collapse ability and its configuration entries. All other dragon attacks, including the Aerial Divebomb, are unchanged.

Lakatos Erik

no undo that, i meant the ability:Dragon's Wrath

Kodari AI
KodariNov 14 at 12:27 pm 1
  • Restore Phase 3 Void Collapse as the retained purple-energy attack, using the existing exclusive, phase-aware attack sequence.

  • Remove Dragon’s Wrath and only its associated wave, warning, and configuration code.

  • Keep the rest of the attacks and the Aerial Divebomb unchanged.

Restored Phase 3 Void Collapse and removed Dragon’s Wrath instead, including its shockwave code and config entries. Void Collapse again charges an expanding ground warning circle, then damages and launches players inside it without changing blocks.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
14 3,685
src/main/java/com/kodari/assassinate/ProjectAssassinate.java
package com.kodari.assassinate;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.plugin.java.JavaPlugin;

public final class ProjectAssassinate extends JavaPlugin implements Listener {
    private TeamManager teams;
    private TrackingManager tracking;
    private AssassinationManager assassinations;
    private FlagManager flags;
    private SupplyDropManager supplyDrops;
    private PresidentManager presidents;
    private CustomDragonManager customDragon;

    @Override public void onEnable() {
        saveDefaultConfig();
        teams = new TeamManager(this);
        tracking = new TrackingManager(this);
        assassinations = new AssassinationManager(this);
        flags = new FlagManager(this);
        supplyDrops = new SupplyDropManager(this);
        presidents = new PresidentManager(this);
        customDragon = new CustomDragonManager(this);
        Bukkit.getPluginManager().registerEvents(this, this);
        Bukkit.getPluginManager().registerEvents(tracking, this);
        Bukkit.getPluginManager().registerEvents(assassinations, this);
        Bukkit.getPluginManager().registerEvents(flags, this);
        Bukkit.getPluginManager().registerEvents(supplyDrops, this);
        Bukkit.getPluginManager().registerEvents(presidents, this);
        Bukkit.getPluginManager().registerEvents(customDragon, this);
        CommandHandler commands = new CommandHandler(this);
        getCommand("assassination").setExecutor(commands);
        getCommand("assassination").setTabCompleter(commands);
        getCommand("points").setExecutor(commands);
        getCommand("points").setTabCompleter(commands);
        getCommand("tc").setExecutor(commands);
        getCommand("tc").setTabCompleter(commands);
        EnderdragonCommand dragonCommand = new EnderdragonCommand(customDragon);
        getCommand("enderdragon").setExecutor(dragonCommand);
        getCommand("enderdragon").setTabCompleter(dragonCommand);
        teams.updateOnlineTabNames();
        for (Player player : Bukkit.getOnlinePlayers()) {
            assassinations.onJoin(player);
            flags.onJoin(player);
            supplyDrops.onJoin(player);
            presidents.onJoin(player);
        }
        getLogger().info("ProjectAssassinate enabled.");
    }

    @Override public void onDisable() {
        if (assassinations != null) assassinations.stop();
        if (flags != null) flags.stopAll();
        if (supplyDrops != null) supplyDrops.close();
        if (presidents != null) presidents.stop();
        if (customDragon != null) customDragon.close();
        if (teams != null) teams.save();
        if (tracking != null) tracking.close();
        if (flags != null) flags.close();
    }

    @EventHandler public void onJoin(PlayerJoinEvent event) {
        Player player = event.getPlayer();
        teams.updateTabName(player);
        assassinations.onJoin(player);
        flags.onJoin(player);
        supplyDrops.onJoin(player);
        presidents.onJoin(player);
    }

    public TeamManager teams() { return teams; }
    public TrackingManager tracking() { return tracking; }
    public AssassinationManager assassinations() { return assassinations; }
    public FlagManager flags() { return flags; }
    public SupplyDropManager supplyDrops() { return supplyDrops; }
    public PresidentManager presidents() { return presidents; }
    public CustomDragonManager customDragon() { return customDragon; }

    public void broadcast(String message) { Bukkit.broadcastMessage(ChatColor.translateAlternateColorCodes('&', message)); }
    public String teamsColorized(String message) { return ChatColor.translateAlternateColorCodes('&', message); }
}