Headshot98 theBoneDad
๐Ÿ“Ž 1 file 17,256 chars
๐Ÿ“„
pasted-code-1790091056105.txt
txt 1115 lines
โ–ถ
1. Boss Selection GUI
Create a command:

/unstable

When I use the command, open a professional Minecraft GUI containing a separate button for every Unstable SMP player.

Include players such as:

FlameFrags

Wemmbu

ItzRealMe

Swight

Other Unstable SMP players that I add later

Each player should have their own button with their name and an appropriate icon.

When I click a player's button, show options for:

Start Fight

Select Difficulty

Select Arena

View Boss Abilities

View Boss Equipment

View Boss Kit

Return to Previous Menu

2. Individual Boss AI
Every Unstable SMP player must be a separate custom boss with their own configurable AI.

Do NOT make them behave like normal Minecraft zombies or mobs.

The bosses should fight like advanced Minecraft PvP opponents.

The AI should be able to:

Chase the player intelligently

Sprint toward the player

Strafe around the player

Circle the player

Maintain appropriate combat distance

Attack at the correct time

Perform combos

Switch weapons

Use shields

Block attacks

Break shields

Use water strategically

Remove or drain water strategically

Use cobwebs strategically

Retreat when necessary

Reposition themselves

Avoid unnecessary fall damage

Use abilities intelligently

React to the player's actions

Change attack patterns

Attempt to survive rather than blindly attack

Use offensive and defensive strategies

The AI should not simply spam attacks.

3. Advanced PvP Abilities
Support configurable advanced Minecraft PvP techniques, including:

Sword combos

Sword critical attacks

Spear/trident-style combat where appropriate

Shield blocking

Shield breaking

Water bucket techniques

Water draining/removing

Cobweb placement

Cobweb trapping

Stun attacks

Slam attacks

Knockback attacks

Projectile attacks where appropriate

Weapon switching

Defensive abilities

Offensive abilities

Movement-based attacks

Combo attacks

Escape and retreat abilities

Every ability must support configurable:

Cooldown

Damage

Range

Duration

Conditions

Effects/animations where possible

The AI should decide when to use abilities instead of using them randomly.

4. Individual Fighting Styles
Every boss must have a different fighting style.

For example:

FlameFrags
Give FlameFrags his own configurable:

Weapons

Armor

Combos

Abilities

Movement

Attack patterns

Defensive behavior

Special techniques

Healing behavior

Individual kit

Wemmbu
Give Wemmbu his own separate:

Weapons

Armor

Combos

Abilities

Movement

Attack patterns

Defensive behavior

Special techniques

Healing behavior

Individual kit

ItzRealMe
Give ItzRealMe his own separate:

Weapons

Armor

Combos

Abilities

Movement

Attack patterns

Defensive behavior

Special techniques

Healing behavior

Individual kit

Swight
Give Swight his own separate:

Weapons

Armor

Combos

Abilities

Movement

Attack patterns

Defensive behavior

Special techniques

Healing behavior

Individual kit

Do the same for every other Unstable SMP player added to the plugin.

DO NOT make every boss use the exact same AI.

5. Equipment
Every boss must have configurable equipment.

Allow configuration of:

Helmet

Chestplate

Leggings

Boots

Sword

Spear/trident or other weapons

Shield

Bow

Crossbow

Water buckets

Cobwebs

Golden Apples

Enchanted Golden Apples

Food

Potions

Arrows/projectiles

Other items

Allow configuration of:

Enchantments

Item attributes

Item names

Item quantities

Custom model data where applicable

Starting durability

Each boss must have its own equipment loadout.

6. Individual Player Kits
Every Unstable SMP boss must have its own individual kit/loadout.

Do NOT give every boss the same kit.

Each kit must independently control:

Armor

Armor enchantments

Sword

Spear/trident or other weapons

Shield

Bow/crossbow if applicable

Water buckets

Cobwebs

Golden Apples

Enchanted Golden Apples

Food

Healing potions

Other potions

Arrows/projectiles

Other PvP items

Item quantities

Item enchantments

Item names

Item attributes

Starting durability

Support configurations such as:

FlameFrags โ†’ FlameFrags Kit

Wemmbu โ†’ Wemmbu Kit

ItzRealMe โ†’ ItzRealMe Kit

Swight โ†’ Swight Kit

and additional custom kits for every other Unstable SMP player.

The exact contents of every kit must be individually configurable.

When a boss spawns, it should automatically receive its configured kit.

7. Boss Health and Combat Statistics
Every boss must have configurable:

Maximum health

Attack damage

Armor

Armor toughness

Knockback resistance

Movement speed

Attack speed

Ability cooldowns

Reaction time

Detection range

Display the boss's health using a Minecraft boss bar.

The boss bar should show:

[Boss Name] - [Current Health]

8. Difficulty System
Add:

Easy

Normal

Hard

Extreme

Nightmare

Difficulty should affect:

Boss reaction time

Accuracy

Attack speed

Ability usage

Aggressiveness

Defensive behavior

Movement

Combo frequency

Health

Damage

AI decision-making

Healing behavior

Make all difficulty settings configurable.

9. Unstable SMP Arenas and Locations
Add support for major Unstable SMP locations as selectable arenas.

Include:

Spawn

Capital City

Merchant City

Highwater City Cave / Cave area

ClownPierce Castle

Additional Unstable SMP locations

Custom arenas

The arena system must allow additional locations to be added later.

10. Arena Selection
After selecting a boss, allow me to select an arena.

The menu should work like:

Select Boss โ†’ Select Arena โ†’ Select Difficulty โ†’ Start Fight

The arena menu should contain:

Spawn

Capital City

Merchant City

Highwater City Cave

ClownPierce Castle

Custom Arena 1

Custom Arena 2

etc.

I should be able to configure which arenas are available for each boss.

Any boss should be usable in any arena.

11. Arena Configuration
Every arena should have configurable:

World name

Player spawn location

Boss spawn location

Spectator location

Arena boundaries

X coordinate

Y coordinate

Z coordinate

Yaw

Pitch

Whether blocks can be broken

Whether blocks can be placed

Whether PvP is enabled

Whether mobs can spawn

Whether the arena resets after a fight

Allow unlimited custom arenas.

Add administrative commands for configuring locations.

12. Existing Maps / Worlds
The plugin must support existing Minecraft worlds.

If I install an Unstable SMP map/world containing locations such as:

Spawn

Capital City

Merchant City

Highwater City Cave

ClownPierce Castle

the plugin should be able to use those locations directly.

Do NOT require the plugin to generate the actual official Unstable SMP map.

If the original map/world is not installed, allow me to configure my own versions of these locations.

Do not claim that unofficial recreated maps are official maps.

13. Arena Reset System
Add an optional arena reset system.

If enabled, after a fight the plugin should be able to restore the arena to its original state.

Potentially restore:

Blocks

Containers

Doors

Chests

Temporary entities

Placed cobwebs

Water

Other temporary changes

Make this configurable.

14. Golden Apple Healing
Every boss should be able to intelligently use Golden Apples.

Allow bosses to carry:

Golden Apples

Enchanted Golden Apples, if enabled

The AI should decide when to heal rather than eating randomly.

For example:

Eat a Golden Apple when health drops below a configurable percentage.

Retreat or create distance before healing when appropriate.

Avoid attempting to eat while being directly attacked if doing so would be ineffective.

Return to combat after healing.

Have configurable healing thresholds.

Have configurable numbers of Golden Apples.

Have configurable restrictions or cooldowns if desired.

Example configuration:

heal-at-health: 45%

golden-apples: 8

enchanted-golden-apples: 0

Make these values different for every boss.

15. Armor Durability
Bosses should have realistic armor durability.

Armor must take damage during combat like a real player's armor.

Allow configuration of:

Armor material

Armor enchantments

Armor durability

Unbreaking level

Mending

Starting durability

Do not make armor magically regenerate unless explicitly configured.

16. Armor Repair and Mending
Support normal Minecraft armor repair behavior.

If a boss has Mending and sufficient experience is available, allow the boss to repair its armor using normal Minecraft Mending mechanics.

If a boss has configured repair items or custom repair abilities, allow the AI to use those resources intelligently.

Armor should normally lose durability during combat and remain damaged until it is properly repaired.

17. Potion Healing System
Add a proper potion-management system for every boss.

Each boss should be able to carry and use healing potions intelligently.

By default, configure 4 healing potions for every boss.

The boss should use potions when appropriate based on its health and combat situation.

For example:

If health becomes low, look for an opportunity to heal.

Create distance from the player when necessary.

Use a healing potion.

Return to combat after healing.

Avoid wasting potions when health is already high.

Do not attempt to heal at an inappropriate moment.

Make the following configurable for every boss:

Number of healing potions

Type of healing potion

Healing threshold

Potion cooldown

Whether potions can be replenished

Maximum potion supply

AI conditions for using potions

18. Automatic Potion Replenishment
Add an optional automatic potion replenishment system.

Default behavior:

Healing potions: 4

When all 4 healing potions have been consumed, replenish the boss back to 4 healing potions.

Make this configurable.

For example:

potion-replenish: true

potion-count: 4

potion-type: SPLASH_POTION

replenish-delay: 0

Also allow:

Limited potion supplies

Unlimited replenishment

Replenishment after a cooldown

Replenishment after all potions are used

The boss should never receive more potions than its configured maximum.

19. Intelligent Potion Usage
Potion usage must be controlled by the boss AI.

The boss should NOT throw all four potions at once.

It should:

Monitor its health.

Decide whether healing is necessary.

Consider the current combat situation.

Create distance or defend itself if necessary.

Use one healing potion.

Wait for the healing effect.

Continue fighting.

Use another potion only when necessary.

20. Equipment Management
Bosses should intelligently manage their equipment.

They should be able to:

Check armor condition.

Check weapon condition.

Switch weapons when appropriate.

Use backup equipment.

Use healing items.

Manage valuable resources.

Continue fighting after healing.

Avoid wasting Golden Apples.

React to damaged equipment.

All healing, durability, repair, and equipment-management settings must be configurable independently for every boss.

21. PvP Survival Behavior
The AI should combine healing and equipment management with normal PvP behavior.

Example:

Fight normally.

Take damage.

Recognize that health is becoming low.

Create distance or use defensive movement.

Use a Golden Apple or healing potion when appropriate.

Allow the healing effect to occur.

Monitor health and armor.

Return to combat.

Continue using weapons and abilities intelligently.

The boss should feel like a skilled PvP player managing health, armor, weapons, healing, and resources.

22. Combined Resource Management
The boss AI should consider:

Current health

Absorption hearts

Armor durability

Weapon durability

Golden Apples remaining

Healing potions remaining

Food

Water buckets

Cobwebs

Shield condition

Available weapons

Ability cooldowns

The boss should make combat decisions based on these resources.

For example:

High health: Continue normal PvP combat.

Medium health: Become more defensive and prepare healing.

Low health: Create distance and use a Golden Apple or healing potion when appropriate.

Damaged armor: Use Mending/repair mechanics if available.

Low resources: Change combat strategy and avoid wasting remaining items.

23. Kit Reset Between Fights
Every time a new boss fight starts, the boss must receive a fresh copy of its configured kit.

Any:

Used Golden Apples

Used potions

Damaged armor

Damaged weapons

Used cobwebs

Used water buckets

Consumed food

Other consumed resources

must be reset to the configured starting kit for the next fight.

One fight must never permanently affect the boss's next fight.

24. Fight Start
When I start a fight:

Save my current location.

Save my current inventory/state if necessary.

Teleport me to the selected arena.

Spawn the selected boss at its configured spawn.

Give the boss its configured individual kit.

Apply its configured attributes.

Start its custom AI.

Display the boss health bar.

Display the boss name.

Begin the fight.

25. Fight End
When the boss dies:

End the fight.

Stop the boss AI.

Remove temporary entities.

Remove temporary effects.

Remove temporary items.

Reset the arena if enabled.

Remove the boss health bar.

Give configured rewards if enabled.

Return the player to their previous location.

When the player dies:

End the fight.

Stop the boss AI.

Remove temporary entities.

Remove temporary effects.

Remove temporary items.

Reset the arena if enabled.

Remove the boss health bar.

Return the player to their previous location.

Add configurable victory and defeat messages.

26. Rewards
Add an optional reward system.

Allow each boss to have configurable rewards such as:

Money

Items

Experience

Commands

Custom rewards

Allow rewards to be disabled.

27. Admin Commands
Add commands such as:

/unstable

/unstable reload

/unstable spawn 

/unstable stop

/unstable arena 

/unstable setspawn 

/unstable setarena 

/unstable list

Add appropriate permissions.

28. Configuration Files
Make the plugin highly configurable.

Create configuration files for:

Bosses

Boss names

Boss health

Damage

Armor

Weapons

Enchantments

Abilities

Ability cooldowns

AI behavior

Difficulty

Arenas

Spawn locations

Rewards

Messages

Permissions

Healing

Golden Apples

Healing potions

Potion replenishment

Armor durability

Mending

Equipment management

Individual kits

Arena reset settings

I should be able to add new bosses and arenas without rewriting the entire plugin.

29. Multiple Simultaneous Fights
Allow multiple players to fight different bosses at the same time if the server has enough resources.

Each fight must be completely independent.

One player's boss fight must not interfere with another player's fight.

30. Performance
Optimize the plugin for a real multiplayer Paper server.

Do not use unnecessarily expensive repeating tasks.

Avoid causing significant server lag.

Use efficient AI calculations.

Properly remove temporary entities and tasks when a fight ends.

31. Compatibility
Target:

Minecraft Java Edition 1.21.11

Paper 1.21.11

Use modern Paper APIs.

Avoid deprecated or incompatible APIs whenever possible.

The final result must compile into a working .jar plugin.

32. Most Important Requirement
This must NOT be a simple mob plugin.

The purpose is to create an Unstable SMP-style PvP boss simulator.

The bosses should feel like skilled Minecraft PvP opponents that can:

Fight with swords

Use spears/tridents where appropriate

Use shields

Break shields

Use water

Remove/drain water

Place cobwebs

Trap players

Stun players

Perform slam attacks

Perform combos

Switch weapons

Move intelligently

Defend themselves

Heal with Golden Apples

Use healing potions

Replenish their 4 healing potions when configured

Manage armor durability

Use Mending when available

Manage weapons

Manage resources

Retreat and reposition

React to the player's actions

Attack strategically

Each Unstable SMP player must have their own unique:

AI

Fighting style

Equipment

Kit

Abilities

Healing behavior

Resource management

Arena configuration

The entire system must be modular so that I can add more Unstable SMP players, abilities, weapons, techniques, healing mechanics, equipment, kits, and maps in the future.
Kodari AI
KodariSep 22 at 3:45 pm 4
UnstableBossArena
A comprehensive PvP boss simulator plugin for Unstable SMP. Features a GUI-based boss selection menu with individual buttons for each SMP player, opening a detailed options interface for starting fights, selecting difficulty levels, choosing arenas, and viewing boss abilities, equipment, and kits. Each boss has unique configurable AI that mimics skilled PvP players, including intelligent movement, strafing, combos, shield usage, water and cobweb tactics, and strategic healing with golden apples and potions. Includes five difficulty tiers, multiple arena locations with configurable boundaries and reset systems, individual kits and equipment loadouts per boss, armor durability and mending mechanics, automatic potion replenishment, rewards, and admin commands for full configuration. Supports multiple simultaneous independent fights with performance optimization for Paper servers.
  1. Create the Paper 1.21.11 Gradle project and plugin resources.

  2. Add configurable boss, kit, ability, difficulty, and arena models/loaders.

  3. Implement the custom PvP fight engine, resource management, boss bar, cleanup, and arena snapshots.

  4. Add the /unstable command flow, GUI menus, admin setup commands, and event listeners.

Implemented the initial Unstable Bosses plugin project from scratch.

Included:

  • Paper 1.21.11 Gradle project

  • /unstable GUI boss selector

  • Bosses:

    • FlameFrags

    • Wemmbu

    • ItzRealMe

    • Swight

  • Configurable boss kits, armor, weapons, enchantments, abilities, health, damage, movement, and healing

  • Difficulty system:

    • Easy

    • Normal

    • Hard

    • Extreme

    • Nightmare

  • Arena configuration with:

    • Spawn

    • Capital City

    • Merchant City

    • Highwater City Cave

    • ClownPierce Castle

  • Arena setup commands:

    • /unstable setarena <arena>

    • /unstable setspawn <arena>

  • Fight flow:

    • Boss selection

    • Arena selection

    • Difficulty selection

    • Fight confirmation

    • Boss bar

    • Player state restoration

    • Fight cleanup

  • Independent simultaneous fight sessions

  • Boss movement and combat logic

  • Strafing, circling, retreating, chasing, combo attacks, knockback, slams, stun, projectile, water, cobweb, and healing behaviors

  • Golden apple and potion management

  • Configurable potion replenishment

  • Temporary block tracking and restoration

  • Armor and weapon durability through normal Bukkit equipment

  • Fight end handling for boss death, player death, and manual stopping

  • Admin commands:

    • /unstable reload

    • /unstable spawn <boss> [arena] [difficulty]

    • /unstable stop

    • /unstable arena

    • /unstable setspawn <arena>

    • /unstable setarena <arena>

    • /unstable list

The project files have been created under the configured package and resource structure.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
settings.gradle
Code
30 1,383
src/main/java/com/kodari/unstable/UnstablePlugin.java
package com.kodari.unstable;

import com.kodari.unstable.command.UnstableCommand;
import com.kodari.unstable.config.ArenaManager;
import com.kodari.unstable.config.BossManager;
import com.kodari.unstable.config.DifficultyManager;
import com.kodari.unstable.fight.FightManager;
import com.kodari.unstable.listener.UnstableListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public class UnstablePlugin extends JavaPlugin {
    private BossManager bossManager;
    private ArenaManager arenaManager;
    private DifficultyManager difficultyManager;
    private FightManager fightManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        saveResource("bosses.yml", false);
        saveResource("arenas.yml", false);
        saveResource("difficulties.yml", false);
        saveResource("messages.yml", false);
        bossManager = new BossManager(this);
        arenaManager = new ArenaManager(this);
        difficultyManager = new DifficultyManager(this);
        bossManager.reload();
        arenaManager.reload();
        difficultyManager.reload();
        fightManager = new FightManager(this);
        Bukkit.getPluginManager().registerEvents(new UnstableListener(this), this);
        UnstableCommand command = new UnstableCommand(this);
        getCommand("unstable").setExecutor(command);
        getCommand("unstable").setTabCompleter(command);
        fightManager.start();
    }

    @Override
    public void onDisable() {
        if (fightManager != null) fightManager.stopAll(false);
    }

    public BossManager getBossManager() { return bossManager; }
    public ArenaManager getArenaManager() { return arenaManager; }
    public DifficultyManager getDifficultyManager() { return difficultyManager; }
    public FightManager getFightManager() { return fightManager; }
}