hridoy5006

Create a complete, production-ready Minecraft Java server plugin called AvengersPowers for Paper Minecraft 1.21+ using Java.

The plugin should provide players with superhero powers inspired by Avengers/Marvel-style heroes.

The plugin must be modular, optimized, configurable and easy to expand with new heroes and abilities.

IMPORTANT:

  • Target Paper Minecraft 1.21+
  • Do not limit the plugin to only one 1.21.x minor version.
  • Use modern Paper/Bukkit APIs compatible with Minecraft 1.21+.
  • Use Java 21 or the Java version required by the selected Paper API.
  • Use Maven.
  • Do not use unnecessary external dependencies.
  • The final project must compile successfully.
  • Do not leave TODOs, placeholder methods, unfinished features or pseudo-code.
  1. RANDOM HERO SYSTEM

When a player joins the server for the first time:

  1. Automatically assign one random hero.
  2. Give the player that hero's Power Item.
  3. Give the player that hero's Power Guide Book.
  4. Store the player's hero permanently using UUID.
  5. Do not randomly change the hero when the player reconnects.
  6. Show a message:

"You have received the power of IRON MAN!"

Configuration:

random-power-on-first-join: true

Also support:

random: enabled: true first-join-only: true prevent-duplicate: false

Allow certain heroes to be disabled from random selection.

Example:

disabled-random-heroes:

  • SCARLET_WITCH
  1. POWER ITEM SYSTEM

Every hero must have a unique Power Item.

Examples:

IRON_MAN:

Iron Man Arc Core

HULK:

Hulk Power

THOR:

Mjolnir

CAPTAIN_AMERICA:

Captain America Shield

SPIDER_MAN:

Web Shooter

HAWKEYE:

Hawkeye Bow

BLACK_PANTHER:

Vibranium Core

DOCTOR_STRANGE:

Mystic Artifact

SCARLET_WITCH:

Chaos Crystal

VISION:

Mind Stone

ANT_MAN:

Pym Core

WINTER_SOLDIER:

Soldier Arm

CAPTAIN_MARVEL:

Cosmic Core

Every Power Item must have:

  • Custom display name
  • Custom lore
  • Enchantment glow
  • Configurable Minecraft material
  • PersistentDataContainer identifier
  • Hero identifier
  • Optional CustomModelData
  • Optional custom item model support if available

IMPORTANT:

Never identify Power Items only by their display name.

Use PersistentDataContainer to safely identify them.

  1. HERO ABILITY SYSTEM

Create a modular HeroAbility system.

Every hero can have:

  • Passive ability
  • Primary ability
  • Secondary ability
  • Movement ability
  • Defensive ability
  • Ultimate ability

Each ability must have:

  • Name
  • Description
  • Trigger
  • Cooldown
  • Damage
  • Range
  • Duration
  • Particle effects
  • Sound effects
  • Animation
  • Configurable settings
  1. COMMON PLAYER CONTROLS

IMPORTANT:

All heroes must use a common control layout.

Do NOT give every hero completely different button combinations.

Players should learn one control system and use the same controls for every hero.

Use the following default controls:

RIGHT CLICK:

Primary Power

LEFT CLICK:

Secondary Power

SHIFT + RIGHT CLICK:

Movement / Utility Power

SHIFT + LEFT CLICK:

Defensive Power

DROP KEY:

Special Power

SWAP HAND:

Ultimate

JUMP:

Passive / Movement ability when applicable

ATTACK:

Passive combat ability when applicable

The controls must be configurable in config.yml.

Example:

controls: primary: RIGHT_CLICK secondary: LEFT_CLICK utility: SHIFT_RIGHT_CLICK defensive: SHIFT_LEFT_CLICK special: DROP ultimate: SWAP_HAND movement: JUMP

The Power Guide Book must always display these controls.

  1. POWER GUIDE BOOK

Every player who receives a hero must receive a special Power Guide Book.

The book should be a written book or another configurable book-style item.

Name:

"Hero Power Guide"

The book must be bound to the player's current hero.

Use PersistentDataContainer to identify the guide book.

When opened, it should contain:

PAGE 1:

Hero name Hero description Hero icon/name Short introduction

PAGE 2:

Primary Power

Example:

IRON MAN

Primary:

Repulsor Blast

Button:

RIGHT CLICK

Description:

Fire an energy blast at the targeted enemy.

PAGE 3:

Secondary Power

Button:

LEFT CLICK

PAGE 4:

Utility / Movement

Button:

SHIFT + RIGHT CLICK

PAGE 5:

Defensive Power

Button:

SHIFT + LEFT CLICK

PAGE 6:

Special Power

Button:

DROP KEY

PAGE 7:

Ultimate

Button:

SWAP HAND

PAGE 8:

Cooldowns

Show every ability's cooldown.

Example:

Repulsor Blast — 3 seconds Missile Strike — 15 seconds Ultimate — 60 seconds

The exact pages should automatically change depending on the hero's abilities.

Do NOT hard-code the book only for Iron Man.

Generate the book dynamically for every hero.

  1. POWER GUIDE COMMAND

Create:

/hero book

This command gives the player a new Power Guide Book for their current hero.

Also create:

/hero guide

as an alias.

If the player has no hero:

"You do not have a hero yet."

The guide book must automatically update if the player's hero changes.

  1. POWER GUIDE INVENTORY GUI

Create:

/hero INVENTORY GUI

Open a Chest INVENTORY GUI showing all available heroes.

When a player clicks a hero:

Show:

  • Hero name
  • Hero description
  • Passive abilities
  • Primary ability
  • Secondary ability
  • Utility ability
  • Defensive ability
  • Special ability
  • Ultimate
  • Controls
  • Cooldowns

The INVENTORY GUI should clearly display:

RIGHT CLICK LEFT CLICK SHIFT + RIGHT CLICK SHIFT + LEFT CLICK DROP KEY SWAP HAND

Use appropriate Minecraft item icons.

  1. HERO ANIMATION SYSTEM

IMPORTANT:

Every hero must have unique visual animations.

Do NOT use the same particle effect for every hero.

Create a modular animation system.

Suggested architecture:

AnimationManager HeroAnimation AbilityAnimation

Each ability can register its own animation.

Animations should combine:

  • Particles
  • Sounds
  • Entity movement
  • Projectile effects
  • Beam effects
  • Shockwaves
  • Trails
  • Screen effects where possible
  • Knockback
  • Temporary entities only when necessary

Animations must be optimized.

  1. IRON MAN ANIMATIONS

Repulsor Blast:

  • Energy beam/trail
  • Spark particles
  • Impact particles
  • Energy sound

Missile Strike:

  • Projectile trail
  • Smoke
  • Flame particles
  • Impact shockwave
  • Explosion sound

Flight:

  • Flame/energy trail beneath player
  • Takeoff animation
  • Landing effect

Energy Shield:

  • Circular energy particles around player
  • Shield activation sound

Arc Reactor Overload:

  • Energy charging animation
  • Increasing particle intensity
  • Large energy burst
  • Shockwave
  • Knockback
  1. HULK ANIMATIONS

Hulk Punch:

  • Heavy impact particles
  • Knockback
  • Ground dust

Ground Smash:

  • Ground shockwave
  • Expanding particle ring
  • Camera-like visual effect using particles
  • Heavy sound

Hulk Jump:

  • Takeoff dust
  • High jump
  • Landing shockwave

Rage Mode:

  • Rage particles
  • Continuous aura
  • Sound activation
  • Strength effects
  1. THOR ANIMATIONS

Lightning Strike:

  • Lightning visual
  • Thunder sound
  • Electric particles

Mjolnir Throw:

  • Spinning projectile
  • Lightning trail
  • Return animation

Thunder Shockwave:

  • Expanding circular lightning effect

God of Thunder:

  • Charging lightning around player
  • Multiple lightning strikes
  • Large final thunder effect
  1. CAPTAIN AMERICA ANIMATIONS

Shield Throw:

  • Spinning shield projectile
  • Trail particles

Shield Return:

  • Return animation toward player

Shield Block:

  • Shield activation particles

Vibranium Barrage:

  • Multiple shield/projectile effects
  • Rapid impact animation
  1. SPIDER-MAN ANIMATIONS

Web Shot:

  • Web-like projectile/trail

Web Pull:

  • Pull animation

Wall Climb:

  • Smooth movement without unnecessary entity creation

Web Swing:

  • Web trail and movement effects

Web Barrage:

  • Multiple web projectiles
  1. HAWKEYE ANIMATIONS

Explosive Arrow:

  • Arrow trail
  • Smoke
  • Impact explosion effect

Lightning Arrow:

  • Lightning trail
  • Electric impact

Grappling Arrow:

  • Grapple visual/trail

Multi Shot:

  • Multiple arrow projectiles

Precision Barrage:

  • Multiple targeted arrows
  1. BLACK PANTHER ANIMATIONS

Vibranium Suit:

  • Aura particles

Claw Attack:

  • Fast claw particles

Kinetic Energy:

  • Energy accumulation effect

Kinetic Release:

  • Large expanding energy wave
  1. DOCTOR STRANGE ANIMATIONS

Magic Projectile:

  • Magical projectile trail

Teleport:

  • Portal-style particles
  • Teleport sound

Mystic Shield:

  • Circular magical shield

Portal:

  • Portal animation
  • Destination effect

Mystic Storm:

  • Large magical particle storm
  1. SCARLET WITCH ANIMATIONS

Magic Bolt:

  • Red/magic-style projectile

Levitation:

  • Floating particles

Magic Push:

  • Expanding magic wave

Area Damage:

  • Area particle effect

Chaos Magic:

  • Large chaotic energy animation
  1. VISION ANIMATIONS

Energy Beam:

  • Long energy beam effect

Phase Mode:

  • Temporary visual effect
  • Movement enhancement

Mind Energy:

  • Energy particles

Mind Stone Blast:

  • Large focused energy attack
  1. ANT-MAN ANIMATIONS

Shrink Mode:

  • Apply safe gameplay effects
  • Visual particles

Giant Mode:

  • Use safe compatible mechanics
  • Do not corrupt player data

Super Jump:

  • Takeoff particles

Giant Smash:

  • Large ground shockwave
  1. WINTER SOLDIER ANIMATIONS

Enhanced Punch:

  • Impact particles

Metal Arm Attack:

  • Metallic/electric effect

Shield Defense:

  • Defensive particle effect

Soldier Rage:

  • Rage aura
  1. CAPTAIN MARVEL ANIMATIONS

Energy Blast:

  • Cosmic energy projectile

Flight:

  • Energy trail

Energy Shield:

  • Circular energy shield

Binary Mode:

  • Large cosmic aura
  • Energy burst
  • Powerful sound effect
  1. HEROES

Implement:

IRON_MAN

HULK

THOR

CAPTAIN_AMERICA

SPIDER_MAN

HAWKEYE

BLACK_PANTHER

DOCTOR_STRANGE

SCARLET_WITCH

VISION

ANT_MAN

WINTER_SOLDIER

CAPTAIN_MARVEL

Each hero must have unique abilities and animations.

  1. COMMANDS

Create:

/hero /hero list /hero info <hero> /hero give <player> <hero> /hero random <player> /hero remove <player> /hero reset <player> /hero powers <player> /hero cooldowns /hero book /hero guide /hero INVENTORY GUI /hero reload /hero help

Add complete tab completion.

  1. PERMISSIONS

Create:

avengerspowers.use avengerspowers.hero avengerspowers.admin avengerspowers.admin.give avengerspowers.admin.random avengerspowers.admin.remove avengerspowers.admin.reset avengerspowers.admin.reload avengerspowers.book avengerspowers.INVENTORY GUI

Hero-specific:

avengerspowers.hero.ironman avengerspowers.hero.hulk avengerspowers.hero.thor avengerspowers.hero.captainamerica avengerspowers.hero.spiderman avengerspowers.hero.hawkeye avengerspowers.hero.blackpanther avengerspowers.hero.doctorstrange avengerspowers.hero.scarletwitch avengerspowers.hero.vision avengerspowers.hero.antman avengerspowers.hero.wintersoldier avengerspowers.hero.captainmarvel

  1. COOLDOWN SYSTEM

Every active ability must have a configurable cooldown.

Example:

cooldowns: ironman: repulsor: 3 missile: 15 flight: 5 shield: 20 ultimate: 60

Display cooldown through:

  • Chat
  • Action Bar
  • Optional BossBar

Allow administrators to disable any of these displays.

  1. CONFIGURATION

Create a detailed config.yml.

Include:

  • Hero settings
  • Ability damage
  • Ability range
  • Cooldowns
  • Duration
  • Knockback
  • Animation settings
  • Particle settings
  • Sound settings
  • Power Item settings
  • Guide Book settings
  • Random hero settings
  • INVENTORY GUI settings
  • Control settings
  • PvP settings
  • Mob damage
  • World restrictions
  • Block damage

Every important value must be configurable.

  1. WORLD SAFETY

Abilities must not permanently damage or corrupt worlds by default.

For explosions:

Do not destroy blocks by default.

Use:

Damage Knockback Particles Sounds Shockwaves

Allow:

abilities.allow-block-damage: false

If enabled, administrators can selectively allow block damage.

  1. PVP SETTINGS

Create:

pvp: abilities-damage-players: true abilities-damage-mobs: true

Allow separate configuration for players and mobs.

  1. DATA STORAGE

Store player data using UUID.

Example:

players: "<UUID>": hero: IRON_MAN

Store:

  • Hero
  • Optional ability preferences
  • Optional guide book state

Hero data must survive server restart.

  1. EVENT HANDLING

Properly handle:

PlayerJoinEvent PlayerQuitEvent PlayerInteractEvent PlayerAnimationEvent where appropriate EntityDamageByEntityEvent PlayerToggleSneakEvent PlayerSwapHandItemsEvent InventoryClickEvent PlayerDropItemEvent PlayerDeathEvent PlayerRespawnEvent ProjectileHitEvent ProjectileLaunchEvent

Use the correct modern Paper/Bukkit events for Minecraft 1.21+.

  1. ANIMATION PERFORMANCE

Animations must be optimized.

Rules:

  • Do not create unnecessary repeating tasks.
  • Do not spawn hundreds of entities for simple visual effects.
  • Prefer Bukkit/Paper particle APIs.
  • Cancel animation tasks when finished.
  • Stop tasks when player disconnects.
  • Avoid memory leaks.
  • Avoid excessive particle counts.
  • Allow animation quality to be configured.

Add:

animation-quality: HIGH

Options:

LOW MEDIUM HIGH

LOW should be suitable for low-end servers.

  1. ARCHITECTURE

Use clean object-oriented architecture.

Suggested:

com.example.avengerspowers

├── AvengersPowers.java ├── hero │ ├── Hero.java │ ├── HeroManager.java │ └── heroes ├── ability │ ├── HeroAbility.java │ ├── AbilityManager.java │ └── abilities ├── animation │ ├── AnimationManager.java │ ├── HeroAnimation.java │ └── animations ├── item ├── guide ├── command ├── listener ├── cooldown ├── data ├── INVENTORY GUI ├── config └── util

Make the system modular.

Adding a new hero should not require rewriting the entire plugin.

  1. REQUIRED FILES

Generate:

pom.xml

plugin.yml

config.yml

messages.yml

All Java source files.

  1. plugin.yml

Use:

name: AvengersPowers version: 1.0.0 main: com.example.avengerspowers.AvengersPowers api-version: '1.21'

Register:

hero:

Add all required permissions.

  1. ERROR HANDLING

Invalid hero:

"Unknown hero. Use /hero list."

Offline player:

"Player not found."

No permission:

"You don't have permission."

No hero:

"You do not have a hero."

Cooldown:

"Ability is on cooldown. Wait %time% seconds."

Never crash the server due to invalid configuration or player data.

  1. FINAL REQUIREMENTS

Provide COMPLETE working source code.

Do NOT provide only an example.

Do NOT omit classes.

Do NOT use placeholder code.

Do NOT use TODO sections.

Every method must be implemented.

Provide:

  1. Complete Java source code.
  2. pom.xml.
  3. plugin.yml.
  4. config.yml.
  5. messages.yml.
  6. Complete Power Guide Book system.
  7. Complete Hero INVENTORY GUI.
  8. Complete common control system.
  9. Unique animations for every hero.
  10. Complete cooldown system.
  11. Random hero system.
  12. All commands.
  13. All permissions.
  14. Installation instructions.
  15. Build instructions.
  16. Explanation of how to add new heroes.
  17. Explanation of how to add new abilities.
  18. Explanation of how to add new animations.
  19. Explanation of how to configure controls.
  20. Explanation of how to configure damage/cooldowns.
  21. Make sure the plugin compiles successfully for Paper Minecraft 1.21+.

The final result should feel like a polished Avengers Superpowers system, where a player receives a random superhero, gets that hero's Power Item and Power Guide Book, can easily understand the common controls, and every ability has its own unique visual animation.

  1. JAVA + BEDROCK/PE CROSS-PLATFORM SUPPORT

IMPORTANT:

The plugin must support both:

  • Minecraft Java Edition 1.21+
  • Minecraft Bedrock/PE players connecting through GeyserMC

The server itself will run on Paper 1.21+.

Bedrock players should be able to join the Java server using:

  • GeyserMC
  • Floodgate

The plugin must be designed so that Java and Bedrock players can use the same hero system.

Do NOT create a separate Bedrock plugin.

The AvengersPowers plugin must run on the Java/Paper server and provide compatible functionality to Bedrock players connected through Geyser.

  1. BEDROCK PLAYER DETECTION

Detect whether a player is connected through Geyser/Floodgate.

If Geyser/Floodgate is installed:

  • Detect Bedrock players safely.
  • Do not crash if Geyser/Floodgate is not installed.
  • The plugin should still work normally for Java players.

Use a soft-dependency or optional integration.

Do NOT make Geyser/Floodgate mandatory for the plugin to start.

  1. CROSS-PLATFORM POWER SYSTEM

Java and Bedrock players must receive the same:

  • Hero
  • Power Item
  • Power Guide
  • Abilities
  • Cooldowns
  • Hero animations
  • Damage
  • Effects
  • INVENTORY GUI where possible
  • Commands

Example:

Java Player:

IRON MAN

Bedrock Player:

HULK

Both should be able to use their abilities normally.

  1. BEDROCK-COMPATIBLE CONTROLS

IMPORTANT:

Bedrock players use different controls from Java players.

The plugin must translate Bedrock-compatible interactions into the same internal ability system.

The internal ability system should NOT depend directly on Java keyboard keys.

Create an abstraction such as:

PlayerInput InputType ControlManager

Supported input types:

PRIMARY SECONDARY UTILITY DEFENSIVE SPECIAL ULTIMATE MOVEMENT

Then map Java and Bedrock controls to those input types.

Example:

PRIMARY:

Java → Right Click Bedrock → Use Item

SECONDARY:

Java → Left Click Bedrock → Attack

UTILITY:

Java → Shift + Right Click Bedrock → Sneak + Use Item

DEFENSIVE:

Java → Shift + Left Click Bedrock → Sneak + Attack

SPECIAL:

Java → Drop Bedrock → configurable compatible action

ULTIMATE:

Java → Swap Hand

Bedrock → configurable alternative trigger

IMPORTANT:

Do not require Bedrock players to press Java keyboard keys that they do not have.

  1. UNIVERSAL CONTROL SYSTEM

Create a universal control system.

Instead of showing only:

"RIGHT CLICK"

show:

"PRIMARY — Right Click / Use Item"

Example Power Guide:

PRIMARY Java: Right Click Bedrock: Use Item

SECONDARY Java: Left Click Bedrock: Attack

UTILITY Java: Shift + Right Click Bedrock: Sneak + Use Item

DEFENSIVE Java: Shift + Left Click Bedrock: Sneak + Attack

SPECIAL Java: Drop Bedrock: Configurable Bedrock Input

ULTIMATE Java: Swap Hand Bedrock: Configurable Bedrock Input

The guide must automatically detect whether the player is Java or Bedrock and display the appropriate controls.

  1. BEDROCK INVENTORY GUI COMPATIBILITY

The "/hero INVENTORY GUI" system must work for:

  • Java players
  • Bedrock players

Use standard inventory-based INVENTORY GUI where compatible.

Do not depend on Java-only client features for core functionality.

If a visual INVENTORY GUI feature cannot be shown correctly on Bedrock:

Provide a fallback menu using:

  • Chat buttons
  • Book interface
  • Simple inventory menu
  • Commands

The player must still be able to view hero information and powers.

  1. BEDROCK POWER GUIDE

The Power Guide Book must work for Bedrock players.

The book should show:

Hero Name

Hero Description

Primary Power

Secondary Power

Utility Power

Defensive Power

Special Power

Ultimate

Cooldowns

Java Controls

Bedrock Controls

Example:

IRON MAN

PRIMARY:

Repulsor Blast

Java:

Right Click

Bedrock:

Use Item

SECONDARY:

Missile Strike

Java:

Left Click

Bedrock:

Attack

ULTIMATE:

Arc Reactor Overload

Java:

Swap Hand

Bedrock:

Use configured Ultimate control

  1. BEDROCK ITEM COMPATIBILITY

Power Items must be usable by Bedrock players.

Do not rely on Java-only item behavior.

Use:

  • Standard Minecraft materials
  • PersistentDataContainer for server-side identification
  • Safe interaction events
  • Geyser-compatible item behavior

If CustomModelData or custom item models are used:

They must be optional.

The plugin must still work correctly without custom resource packs.

  1. RESOURCE PACK COMPATIBILITY

The plugin should NOT require a resource pack.

All core abilities must work using vanilla Minecraft items, particles and sounds.

Optionally support:

Java resource packs Bedrock resource packs

but they must not be required.

If custom models are implemented, provide fallback vanilla models.

  1. CROSS-PLATFORM ANIMATIONS

Every hero and ability must have unique animations.

Animations must be visible to both:

  • Java players
  • Bedrock players

Prefer server-side:

  • Particles
  • Sounds
  • Projectiles
  • Entity movement
  • Lightning effects
  • Shockwaves
  • Trails

Avoid client-specific effects that only Java players can see.

  1. CROSS-PLATFORM PARTICLES

Use particle APIs that are properly translated by Geyser where possible.

Avoid depending on unsupported Java-exclusive client effects.

If a particle effect is unavailable or unreliable on Bedrock:

Use a compatible fallback particle.

Example:

Iron Man:

Energy particles → fallback to vanilla flame/electric-style particles

Thor:

Lightning → vanilla lightning effect

Hulk:

Shockwave → dust/block particles

Spider-Man:

Web effect → cobweb/string-style particles

Doctor Strange:

Magic effect → portal/enchant particles

  1. CROSS-PLATFORM SOUNDS

Use vanilla Minecraft sounds that exist on both editions whenever possible.

If a Java-specific sound is used:

Provide a fallback sound.

Never make an ability completely silent on Bedrock because a Java-only sound is unavailable.

  1. CROSS-PLATFORM COMMANDS

All commands must work for both Java and Bedrock players:

/hero /hero list /hero info /hero powers /hero cooldowns /hero book /hero guide /hero INVENTORY GUI

Commands must not depend on Java client-specific functionality.

  1. BEDROCK INPUT FALLBACK

Some Java events may not map perfectly to Bedrock.

Create a fallback control system.

Configuration:

bedrock-controls: primary: USE_ITEM secondary: ATTACK utility: SNEAK_USE_ITEM defensive: SNEAK_ATTACK special: DROP ultimate: SWAP_HAND

If an input cannot be detected reliably through Geyser:

Use an alternative configurable interaction.

For example:

  • Item interaction
  • Sneak + item interaction
  • Specific Power Item interaction
  • Command fallback

Do not make abilities unusable on Bedrock.

  1. HERO POWER ITEM SAFETY

A player should only activate abilities if:

  • They own the corresponding hero.
  • They are holding the correct Power Item when required.
  • The item has the correct PersistentDataContainer tag.
  • The ability is not on cooldown.
  • The player is alive.

Do not allow players to duplicate or spoof Power Items simply by renaming normal items.

  1. CROSS-PLATFORM TESTING REQUIREMENT

The generated project must be designed for testing with:

Java client:

Paper 1.21+

Bedrock client:

Minecraft Bedrock/PE → GeyserMC → Floodgate → Paper 1.21+

Test at minimum:

  1. Java player receives random hero.
  2. Bedrock player receives random hero.
  3. Java player uses Primary ability.
  4. Bedrock player uses Primary ability.
  5. Java player uses Ultimate.
  6. Bedrock player uses Ultimate.
  7. Power Guide displays correct controls.
  8. Hero INVENTORY GUI works or fallback menu appears.
  9. Cooldowns work for both.
  10. Animations are visible to both.
  11. Server restart preserves heroes.
  12. Java and Bedrock players can fight each other using abilities.
  1. OPTIONAL GEYSER INTEGRATION

Create a separate integration class:

GeyserIntegration

Responsibilities:

  • Detect Geyser
  • Detect Floodgate
  • Detect Bedrock players
  • Provide platform information
  • Provide Bedrock-compatible control mapping

Example:

PlayerPlatform.JAVA PlayerPlatform.BEDROCK

If Geyser/Floodgate is not installed:

Every player is treated as JAVA.

The plugin must continue working normally.

  1. FINAL CROSS-PLATFORM REQUIREMENT

The final plugin must provide one unified Avengers power system.

JAVA PLAYER:

Paper 1.21+ ↓ AvengersPowers ↓ Hero + Power Item + Power Guide ↓ Java Controls

BEDROCK PLAYER:

Minecraft PE/Bedrock ↓ GeyserMC + Floodgate ↓ Paper 1.21+ ↓ AvengersPowers ↓ Hero + Power Item + Power Guide ↓ Bedrock Controls

Both platforms must use the same underlying Hero and Ability system.

Do not create separate hero implementations for Java and Bedrock.

Only the input/control layer and optional UI layer should differ.

The final plugin should therefore allow a Java player and a Bedrock/PE player to join the same server and use the Avengers powers together.

Kodari AI
KodariAug 17 at 8:35 am 6
AvengersPowers
A comprehensive Paper Minecraft plugin that assigns random superhero powers to players, providing unique Power Items, abilities, and animations for 13 Marvel heroes. Features a modular HeroAbility system with common cross-platform controls, dynamic Power Guide books, hero selection GUI, configurable cooldowns, and full Geyser/Bedrock compatibility. Includes complete command system, permissions, data persistence, and optimized animation framework supporting Java and Bedrock players.
  1. Create the Maven Paper project, configuration, plugin metadata, and core hero/ability models.

  2. Add persistence, item/guide generation, universal Java/Bedrock input mapping, cooldowns, and animations.

  3. Add the unified ability execution/listener layer and the hero inventory GUI.

  4. Add /hero commands, permissions, tab completion, and installation/configuration documentation.

Implemented the complete AvengersPowers Paper plugin project.

Included

  • Maven build targeting Java 21 and Paper 1.21+

  • 13 heroes:

    • Iron Man

    • Hulk

    • Thor

    • Captain America

    • Spider-Man

    • Hawkeye

    • Black Panther

    • Doctor Strange

    • Scarlet Witch

    • Vision

    • Ant-Man

    • Winter Soldier

    • Captain Marvel

  • Permanent UUID-based hero storage

  • Configurable random first-join hero assignment

  • PersistentDataContainer-based Power Items and Guide Books

  • Custom model and custom material support

  • Dynamic Power Guide Book with:

    • Hero information

    • All abilities

    • Java controls

    • Bedrock controls

    • Cooldowns

  • /hero command system:

    • list

    • info

    • give

    • random

    • remove

    • reset

    • powers

    • cooldowns

    • book

    • guide

    • inventory

    • reload

    • help

  • Complete tab completion

  • Hero inventory GUI and hero detail GUI

  • Shared control abstraction using:

    • PRIMARY

    • SECONDARY

    • UTILITY

    • DEFENSIVE

    • SPECIAL

    • ULTIMATE

    • MOVEMENT

  • Java and Bedrock control mappings

  • Optional reflective Geyser/Floodgate detection without mandatory dependencies

  • Configurable cooldown system with:

    • Chat messages

    • Action bar

    • Optional boss bars

  • Hero-specific passive combat effects

  • PVP and mob damage configuration

  • World restrictions

  • Safe ability effects without block destruction by default

  • Modular animation manager with unique hero animation profiles

  • Respawn item and guide restoration

  • Configurable animation quality and sound/particle settings

  • All required permissions and soft dependencies

Build

Shell
mvn clean package

The generated jar will be:

Plain Text
target/AvengersPowers.jar

Copy it into:

Plain Text
plugins/

Then restart the Paper server.

Optional Bedrock Support

Install:

  • GeyserMC

  • Floodgate

No additional AvengersPowers dependency is required. The plugin detects Floodgate/Geyser reflectively and continues functioning normally when they are absent.

Adding a Hero

Add a new hero entry in:

Plain Text
src/main/java/com/example/avengerspowers/hero/HeroCatalog.java

The catalog automatically creates missing special and ultimate abilities when necessary. Add matching configuration under:

YAML
abilities:

Add a material under:

YAML
power-items:

Then add the hero permission to plugin.yml.

Adding Abilities

Add the ability definition to the hero’s definition array in HeroCatalog. Ability values such as damage, range, duration, knockback, and cooldown are read from config.yml.

Adding Animations

Add hero-specific animation logic inside:

Plain Text
src/main/java/com/example/avengerspowers/animation/AnimationManager.java

The ability manager automatically passes the hero, ability slot, player, and targeted entity to the animation layer.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
25 1,213
src/main/java/com/example/avengerspowers/AvengersPowers.java
package com.example.avengerspowers;

import com.example.avengerspowers.ability.AbilityManager;
import com.example.avengerspowers.animation.AnimationManager;
import com.example.avengerspowers.cooldown.CooldownManager;
import com.example.avengerspowers.data.PlayerDataStore;
import com.example.avengerspowers.guide.GuideBookManager;
import com.example.avengerspowers.gui.HeroMenu;
import com.example.avengerspowers.hero.Hero;
import com.example.avengerspowers.hero.HeroManager;
import com.example.avengerspowers.input.ControlManager;
import com.example.avengerspowers.input.GeyserIntegration;
import com.example.avengerspowers.item.PowerItemManager;
import com.example.avengerspowers.listener.PowerListener;
import com.example.avengerspowers.command.HeroCommand;
import com.example.avengerspowers.util.MessageUtil;
import org.bukkit.Bukkit;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
import java.util.Map;

public final class AvengersPowers extends JavaPlugin {
    private PlayerDataStore data;
    private HeroManager heroes;
    private PowerItemManager items;
    private GuideBookManager guides;
    private ControlManager controls;
    private CooldownManager cooldowns;
    private AnimationManager animations;
    private AbilityManager abilities;
    private HeroCommand command;

    @Override public void onEnable() {
        saveDefaultConfig();
        saveResource("messages.yml", false);
        loadMessages();
        data = new PlayerDataStore(this);
        heroes = new HeroManager(data);
        items = new PowerItemManager(this);
        controls = new ControlManager(getConfig(), new GeyserIntegration());
        guides = new GuideBookManager(this, items, controls);
        cooldowns = new CooldownManager();
        animations = new AnimationManager(this);
        abilities = new AbilityManager(this, heroes, items, cooldowns, animations);
        Bukkit.getPluginManager().registerEvents(new PowerListener(this), this);
        command = new HeroCommand(this);
        if (getCommand("hero") != null) { getCommand("hero").setExecutor(command); getCommand("hero").setTabCompleter(command); }
        getLogger().info("AvengersPowers enabled with " + heroes.all().size() + " heroes.");
    }

    @Override public void onDisable() { Bukkit.getOnlinePlayers().forEach(player -> animations.stop(player)); cooldowns.clearAll(); }

    public void assign(Player player, Hero hero, boolean announce) {
        Hero old = heroes.get(player.getUniqueId());
        if (old != null) items.removeForHero(player, old);
        guides.removeAll(player);
        heroes.set(player.getUniqueId(), hero);
        items.give(hero, player);
        guides.give(player, hero);
        if (announce) MessageUtil.send(this, player, "received", Map.of("hero", hero.displayName().toUpperCase()));
    }

    public void remove(Player player) { Hero hero = heroes.get(player.getUniqueId()); if (hero != null) items.removeForHero(player, hero); guides.removeAll(player); heroes.remove(player.getUniqueId()); abilities.clear(player); }
    public void giveMissingItems(Player player) { Hero hero = heroes.get(player.getUniqueId()); if (hero == null) return; boolean item = false; for (ItemStack stack : player.getInventory().getContents()) if (items.isPowerItem(stack, hero)) item = true; if (!item) items.give(hero, player); if (!guides.hasGuide(player)) guides.give(player, hero); }

    public void reloadPlugin() { reloadConfig(); loadMessages(); controls = new ControlManager(getConfig(), new GeyserIntegration()); guides = new GuideBookManager(this, items, controls); }
    private void loadMessages() {
        File file = new File(getDataFolder(), "messages.yml");
        FileConfiguration messages = YamlConfiguration.loadConfiguration(file);
        for (String key : messages.getKeys(true)) if (!messages.isConfigurationSection(key)) getConfig().set("messages." + key, messages.get(key));
    }

    public HeroManager heroes() { return heroes; }
    public PowerItemManager items() { return items; }
    public GuideBookManager guides() { return guides; }
    public ControlManager controls() { return controls; }
    public AbilityManager abilities() { return abilities; }
    public void openHeroMenu(Player player) { HeroMenu.open(this, player); }
}