m3sconmc

Create a Minecraft Spigot/Paper plugin (1.20+) called AvatarBending inspired by the concept of elemental abilities (similar in idea to Glitch-style SMP plugins, but fully original and bending-based).

The plugin must implement a single-slot bending system, meaning:

A player can only have ONE active bending at a time.

Bendings are obtained through custom items.

Right-clicking a bending item places the bending into the player’s action bar slot (active slot system).

If a bending is already active, the player cannot activate another.

The plugin should send a configurable message telling the player they must withdraw their current bending first.

Players must use a command (for example /withdrawbending) to remove their current bending from the action bar and receive it back as an item in their inventory.

⚙ Core Systems 1️⃣ Bending Slot System

Only 1 bending active per player.

Stored using UUID-based data system.

Prevent stacking or duplication.

On death, bending stays active (configurable).

On logout, bending remains saved.

2️⃣ Commands

/ability1 → triggers first active ability

/ability2 → triggers second active ability

/withdrawbending → removes active bending and gives item back

/bendings → shows current bending

/avatar reload → reloads config files

All messages must be fully configurable in lang.yml.

📁 Configuration Files config.yml

Cooldowns

Damage values

Ability durations

Whether bending is kept on death

Whether particles are enabled

Whether sound effects are enabled

Global toggles per bending

lang.yml

All messages customizable:

No permission

Cooldown message

Bending already active

Withdraw success

Ability activation

Error messages

Avatar State warning damage message

items.yml

Each bending item must support:

CustomModelData

Display name

Lore

Crafting recipe

Enable/disable toggle

Material type

Glow effect option

🌊 Bendings & Abilities

There are 5 bendings total:

💧 Waterbending Passive – Flow with the Current

Increased swim speed.

Extended underwater breathing time.

Active 1 – Water Whip

Shoots a water projectile.

Deals damage.

Slightly pulls target toward player.

Cooldown: 15 seconds.

Active 2 – Ice Freeze

Freezes nearby water blocks OR enemies standing in water.

Immobilizes enemies for 3 seconds.

Cooldown: 25 seconds.

🔥 Firebending Passive – Heat Within

Full fire immunity.

50% lava damage reduction.

Active 1 – Fire Blast

Shoots fire projectile.

Sets target on fire for 3 seconds.

Cooldown: 10 seconds.

Active 2 – Fire Jet

Propels player forward using flame burst.

Works similar to controlled dash.

Cooldown: 20 seconds.

🌪 Airbending Passive – Light as Air

No fall damage.

Slight speed boost.

Active 1 – Air Gust

Pushes nearby entities backward.

No damage or very low damage.

Cooldown: 10 seconds.

Active 2 – Air Scooter

Short burst of high speed.

Creates wind particle sphere effect.

Cooldown: 20 seconds.

🪨 Earthbending Passive – Unshakable

Reduced knockback.

+1 armor when standing on solid ground.

Active 1 – Earth Wall

Creates temporary 3-block wide stone wall in front of player.

Disappears after configurable time.

Cooldown: 20 seconds.

Active 2 – Earth Slam

Creates ground shockwave.

Damages and slightly launches nearby enemies upward.

Cooldown: 25 seconds.

🌟 Avatar Bending (Rare / Harder to Obtain) Passive – Balance of the Four

Gains weaker versions of all elemental passives.

Active 1 – Avatar State

Duration: 10 seconds.

Strength II

Speed II

Resistance I

Glowing effect

After effect: Player takes 3 hearts of true damage.

Cooldown: 90 seconds.

Active 2 – Elemental Surge

Radial burst of all four elements.

Pushes enemies back.

Moderate damage.

Strong particle effects.

Cooldown: 45 seconds.

🔄 Additional Requirements

Proper cooldown manager per player per ability.

Cooldown message showing remaining seconds.

Use action bar messages for ability feedback.

Optional boss bar for Avatar State timer.

Clean OOP structure (BendingManager, AbilityManager, CooldownManager, ItemManager).

Fully optimized for multiplayer servers.

No memory leaks.

Support PlaceholderAPI (optional placeholder: %avatar_bending%).

Works without requiring other plugins.

🎮 Gameplay Design Goals

Balanced for SMP PvP.

Not overpowered but impactful.

Smooth particle visuals.

Clean ability triggers.

Prevent exploits (no stacking, no duplication, no spam).

Kodari AI
KodariFeb 25 at 9:28 pm 29,499 (v2)

I’ll create a comprehensive AvatarBending plugin with a single-slot bending system, 5 elemental bendings, and fully configurable abilities.

AvatarBending
A single-slot elemental bending system where players can master one of five elements: Water, Fire, Air, Earth, or the rare Avatar state. Each bending features unique passive abilities and two active abilities triggered through commands. Players obtain bendings through custom items and can only have one active at a time. Includes full configuration for abilities, cooldowns, damage values, particles, and messages. Optimized for multiplayer SMP/PvP gameplay with balanced mechanics.

Now I’ll create the complete plugin structure with all required systems:

Now I’ll create the configuration files:

Complete AvatarBending plugin created with single-slot bending system, 5 elements (Water, Fire, Air, Earth, Avatar), passive and active abilities, full configuration support, cooldown management, and persistent data storage.

m3sconmc

how can i get the abbilites

Kodari AI
KodariFeb 25 at 9:38 pm 11,559 (v2)

I’ll check the plugin files to understand how the ability system works.

Based on the plugin code, here’s how to get abilities in AvatarBending:

🎯 How to Obtain Abilities

1. Get a Bending Scroll

You need one of these special items (scrolls) to activate a bending type:

  • 💧 Water Bending Scroll - Light Blue Dye (custom model data: 1001)

  • 🔥 Fire Bending Scroll - Red Dye (custom model data: 1002)

  • 💨 Air Bending Scroll - White Dye (custom model data: 1003)

  • ⛰️ Earth Bending Scroll - Brown Dye (custom model data: 1004)

  • ⚡ Avatar Bending Scroll - Purple Dye (custom model data: 1005)

Note: Currently, there’s no command to give these items - an admin would need to create a give command or use a plugin like ItemsAdder/ExecutableItems to distribute them.

2. Activate Your Bending

  • Right-click while holding a bending scroll

  • The scroll will be consumed and you’ll receive that bending type

  • You can only have one bending active at a time

3. Use Your Abilities

Once activated, you can use abilities with commands:

  • /ability1 - Use your first ability

  • /ability2 - Use your second ability

Each bending has different abilities:

  • Water: Water Whip & Ice Freeze

  • Fire: Fire Blast & Fire Jet

  • Air: Air Gust & Air Scooter

  • Earth: Earth Wall & Earth Slam

  • Avatar: Avatar State & Elemental Surge

4. Other Commands

  • /bendings - Check your current bending type

  • /withdrawbending - Remove your bending and get the scroll back

Passive Bonuses

Each bending also gives passive abilities automatically (swim speed for water, fire immunity for fire, no fall damage for air, etc.)


💡 Tip: The plugin is missing a command to give players scrolls. You may want to add a command like /avatarbending give <player> <type> to distribute them!

m3sconmc

i want to add the active bending to the action bar like the image i attached (configureable) and add the missing command

1 image attached
Kodari AI
KodariFeb 25 at 9:44 pm 29,720 (v2)

I’ll help you add the action bar display for active bending and add any missing commands. Let me first read the existing files to understand the structure.

Now I’ll add the action bar display and the missing /givebending command.

Plan:

  • Create ActionBarManager for periodic action bar updates showing active bending

  • Create GiveBendingCommand for admins to give bending items

  • Update configs with action bar settings and messages

  • Register the new manager and command in main class

Action bar display and /givebending command added with full configuration support.

m3sconmc

two things. 1- is there a cooldown placeholder for me to add to the action bar 2- is there a way to turn the actionbar as idle and if there is no bending it will write through the config?

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
34 2,107
src/main/java/com/avatarbending/AvatarBending.java
package com.avatarbending;

import com.avatarbending.commands.*;
import com.avatarbending.listeners.*;
import com.avatarbending.managers.*;
import lombok.Getter;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.plugin.java.JavaPlugin;

import java.io.File;

@Getter
public class AvatarBending extends JavaPlugin {
    
    private FileConfiguration langConfig;
    private FileConfiguration itemsConfig;
    
    private BendingManager bendingManager;
    private AbilityManager abilityManager;
    private CooldownManager cooldownManager;
    private ItemManager itemManager;
    private ActionBarManager actionBarManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        loadConfigs();
        
        this.cooldownManager = new CooldownManager();
        this.bendingManager = new BendingManager(this);
        this.abilityManager = new AbilityManager(this);
        this.itemManager = new ItemManager(this);
        this.actionBarManager = new ActionBarManager(this);
        
        registerCommands();
        registerListeners();
        
        getLogger().info("AvatarBending has been enabled!");
    }
    
    @Override
    public void onDisable() {
        bendingManager.saveAllData();
        getLogger().info("AvatarBending has been disabled!");
    }
    
    private void loadConfigs() {
        File langFile = new File(getDataFolder(), "lang.yml");
        if (!langFile.exists()) {
            saveResource("lang.yml", false);
        }
        langConfig = YamlConfiguration.loadConfiguration(langFile);
        
        File itemsFile = new File(getDataFolder(), "items.yml");
        if (!itemsFile.exists()) {
            saveResource("items.yml", false);
        }
        itemsConfig = YamlConfiguration.loadConfiguration(itemsFile);
    }
    
    public void reloadConfigs() {
        reloadConfig();
        File langFile = new File(getDataFolder(), "lang.yml");
        langConfig = YamlConfiguration.loadConfiguration(langFile);
        File itemsFile = new File(getDataFolder(), "items.yml");
        itemsConfig = YamlConfiguration.loadConfiguration(itemsFile);
        itemManager.loadItems();
    }
    
    private void registerCommands() {
        getCommand("ability1").setExecutor(new Ability1Command(this));
        getCommand("ability2").setExecutor(new Ability2Command(this));
        getCommand("withdrawbending").setExecutor(new WithdrawBendingCommand(this));
        getCommand("bendings").setExecutor(new BendingsCommand(this));
        getCommand("avatar").setExecutor(new AvatarCommand(this));
        getCommand("givebending").setExecutor(new GiveBendingCommand(this));
    }
    
    private void registerListeners() {
        Bukkit.getPluginManager().registerEvents(new PlayerInteractListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerQuitListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        Bukkit.getPluginManager().registerEvents(new PassiveListener(this), this);
    }
    
    public String getMessage(String path) {
        String message = langConfig.getString(path, "&cMessage not found: " + path);
        return org.bukkit.ChatColor.translateAlternateColorCodes('&', message);
    }
    
    public String getMessage(String path, String... replacements) {
        String message = getMessage(path);
        for (int i = 0; i < replacements.length; i += 2) {
            if (i + 1 < replacements.length) {
                message = message.replace(replacements[i], replacements[i + 1]);
            }
        }
        return message;
    }
}