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.
- RANDOM HERO SYSTEM
When a player joins the server for the first time:
- Automatically assign one random hero.
- Give the player that hero's Power Item.
- Give the player that hero's Power Guide Book.
- Store the player's hero permanently using UUID.
- Do not randomly change the hero when the player reconnects.
- 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:
- 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.
- 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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
- 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
- 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
- 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
- SPIDER-MAN ANIMATIONS
Web Shot:
- Web-like projectile/trail
Web Pull:
Wall Climb:
- Smooth movement without unnecessary entity creation
Web Swing:
- Web trail and movement effects
Web Barrage:
- HAWKEYE ANIMATIONS
Explosive Arrow:
- Arrow trail
- Smoke
- Impact explosion effect
Lightning Arrow:
- Lightning trail
- Electric impact
Grappling Arrow:
Multi Shot:
- Multiple arrow projectiles
Precision Barrage:
- BLACK PANTHER ANIMATIONS
Vibranium Suit:
Claw Attack:
Kinetic Energy:
- Energy accumulation effect
Kinetic Release:
- Large expanding energy wave
- DOCTOR STRANGE ANIMATIONS
Magic Projectile:
Teleport:
- Portal-style particles
- Teleport sound
Mystic Shield:
Portal:
- Portal animation
- Destination effect
Mystic Storm:
- Large magical particle storm
- SCARLET WITCH ANIMATIONS
Magic Bolt:
- Red/magic-style projectile
Levitation:
Magic Push:
Area Damage:
Chaos Magic:
- Large chaotic energy animation
- VISION ANIMATIONS
Energy Beam:
Phase Mode:
- Temporary visual effect
- Movement enhancement
Mind Energy:
Mind Stone Blast:
- Large focused energy attack
- ANT-MAN ANIMATIONS
Shrink Mode:
- Apply safe gameplay effects
- Visual particles
Giant Mode:
- Use safe compatible mechanics
- Do not corrupt player data
Super Jump:
Giant Smash:
- WINTER SOLDIER ANIMATIONS
Enhanced Punch:
Metal Arm Attack:
Shield Defense:
- Defensive particle effect
Soldier Rage:
- CAPTAIN MARVEL ANIMATIONS
Energy Blast:
Flight:
Energy Shield:
Binary Mode:
- Large cosmic aura
- Energy burst
- Powerful sound effect
- 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.
- 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.
- 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
- 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.
- 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.
- 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.
- PVP SETTINGS
Create:
pvp: abilities-damage-players: true abilities-damage-mobs: true
Allow separate configuration for players and mobs.
- 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.
- 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+.
- 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.
- 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.
- REQUIRED FILES
Generate:
pom.xml
plugin.yml
config.yml
messages.yml
All Java source files.
- plugin.yml
Use:
name: AvengersPowers version: 1.0.0 main: com.example.avengerspowers.AvengersPowers api-version: '1.21'
Register:
hero:
Add all required permissions.
- 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.
- 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:
- Complete Java source code.
- pom.xml.
- plugin.yml.
- config.yml.
- messages.yml.
- Complete Power Guide Book system.
- Complete Hero INVENTORY GUI.
- Complete common control system.
- Unique animations for every hero.
- Complete cooldown system.
- Random hero system.
- All commands.
- All permissions.
- Installation instructions.
- Build instructions.
- Explanation of how to add new heroes.
- Explanation of how to add new abilities.
- Explanation of how to add new animations.
- Explanation of how to configure controls.
- Explanation of how to configure damage/cooldowns.
- 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.
- 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:
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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
- 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.
- 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.
- 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.
- 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
- 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.
- 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.
- 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.
- 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.
- 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:
- Java player receives random hero.
- Bedrock player receives random hero.
- Java player uses Primary ability.
- Bedrock player uses Primary ability.
- Java player uses Ultimate.
- Bedrock player uses Ultimate.
- Power Guide displays correct controls.
- Hero INVENTORY GUI works or fallback menu appears.
- Cooldowns work for both.
- Animations are visible to both.
- Server restart preserves heroes.
- Java and Bedrock players can fight each other using abilities.
- 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.
- 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.