โก ELEMENTALPOWER โ COMPLETE ADVANCED MINECRAFT PLUGIN
1. PROJECT OVERVIEW
Build a complete, professional, production-quality Minecraft Java plugin named ElementalPower for my server, POWER SMP.
The plugin must support Minecraft 1.21 and newer compatible versions, using Paper API and Java. Use Maven for project management and provide the complete, compilable source code.
CRITICAL REQUIREMENT: Do not create a plugin that only looks good or contains placeholder abilities. Every implemented ability must perform its intended gameplay effect. Fix all event handlers, inventory interactions, cooldowns, power assignments, and ability execution logic.
Do not claim the plugin is 100% bug-free without testing it.
2. TECHNICAL REQUIREMENTS
- Plugin name: ElementalPower
- Main package:
com.darkskgamer.elementalpower - Main class:
com.darkskgamer.elementalpower.ElementalPower - Target platform: Paper Minecraft 1.21+
- Language: Java
- Build system: Maven
- Use a compatible Java version for the selected Paper API.
- Include
plugin.yml,config.yml,powers.yml, and other necessary resource files. - Use supported Bukkit/Paper APIs and avoid deprecated or version-fragile methods where possible.
- Store player data persistently using YAML or another appropriate local storage solution.
- Make the plugin configurable, maintainable, and efficient.
- Handle player deaths, respawns, reconnects, inventory-full situations, and server restarts correctly.
If different Minecraft versions require different API behavior, document the supported version range and implement compatibility deliberately.
3. FOURTEEN ELEMENTAL POWERS
Implement exactly 14 distinct powers, each with 10 unique, functional abilities.
- FIRE โ burning attacks, fire projectiles, flame bursts, fire resistance.
- WATER โ water projectiles, healing, water waves, defensive currents.
- EARTH โ stone attacks, ground shockwaves, defensive barriers, knockback.
- NATURE โ vines, roots, regeneration, nature-based area control.
- ICE โ freezing effects, ice projectiles, slowing fields, ice barriers.
- LIGHTNING โ lightning strikes, chain damage, speed boosts, electrical bursts.
- WIND โ gusts, air projectiles, jumps, controlled knockback.
- GRAVITY โ controlled pulls, pushes, levitation, gravity-themed area effects.
- SHADOW โ dark projectiles, temporary invisibility, darkness effects, shadow movement.
- LIGHT โ radiant projectiles, illumination, healing, protective effects.
- CRYSTAL โ crystal projectiles, reflective-style defenses, crystal bursts.
- METAL โ metallic projectiles, defensive armor effects, impact attacks.
- SOLAR โ solar blasts, radiant bursts, temporary buffs, area damage.
- ARCANE โ magical projectiles, teleportation-style movement, arcane shields.
Each power must have 10 genuinely distinct abilities, for a total of 140 implemented abilities.
Do not count renamed copies of the same ability as unique abilities. Each ability must have its own name, description, effect, cooldown, activation logic, and configuration.
4. JOIN-TO-SPIN SYSTEM
When a player joins for the first time:
- Check whether the player already owns a power.
- If not, give them a specially named Power Spin item.
- Use a visually attractive enchanted item with custom name, lore, and particles where appropriate.
- Tell the player how to use it.
- Clicking the item must open a power-selection or spinning interface.
- Animate the spin using inventory updates, sounds, and visual effects.
- Select one of the 14 powers randomly.
- Assign the selected power permanently.
- Save the player's power immediately.
- Replace or remove the spin item safely.
- Give the player their assigned Power Core item immediately.
- Display a title, subtitle, chat message, sound, and suitable elemental effects.
Prevent players from receiving multiple powers because of reconnects, repeated clicks, or duplicate event execution.
The spin must not block the main server thread with delays or loops. Use safe scheduled tasks and cancel them when appropriate.
Provide an admin-configurable option to allow players to spin again.
5. POWER CORE ITEM
Every player who owns a power must receive a special Power Core item.
Requirements:
- Unique display name and lore based on the assigned element.
- Enchantment glint or another visual enhancement.
- Correct item identification using PersistentDataContainer rather than the item's display name alone.
- Safe handling of item movement, dropping, inventory swapping, death, and respawning.
- No accidental duplication.
- A configurable option to restore a missing Power Core.
- Power-specific color styling where supported.
When a player right-clicks the Power Core, open the ability GUI for their assigned power.
When a player left-clicks with the item, do not accidentally trigger unrelated vanilla actions or break blocks if the item is configured as a protected ability tool.
6. ABILITY GUI
Create a polished inventory-based GUI.
The main GUI must display:
- Power name and element.
- All 10 abilities belonging to that power.
- Ability icons.
- Ability descriptions.
- Cooldown information.
- Activation instructions.
- Locked or unavailable ability status, if applicable.
- Back and close buttons.
- Appropriate decorative borders.
Clicking an ability must select or activate it according to the configured control system.
Use inventory click and drag event handlers correctly. Prevent GUI items from being taken, moved, or duplicated.
Identify custom GUI inventories safely. Never assume that every inventory with a matching title belongs to the plugin.
Handle invalid slots, shift-clicks, number-key swaps, offhand swaps, double-clicks, and drag events.
7. ABILITY ACTIVATION SYSTEM
Implement a reliable ability manager.
Provide at least these activation methods:
- Right-click the Power Core to open the ability GUI.
- Click an ability to activate it.
- Optional configurable hotbar ability selection.
- Sneak-and-click activation where practical and conflict-free.
- Commands to select or activate abilities.
Use Bukkit/Paper events and scheduled tasks correctly.
Every ability must:
- Confirm that the player has an assigned power.
- Confirm that the requested ability belongs to that power.
- Check cooldown and other requirements.
- Check whether the player is allowed to use abilities in the current situation.
- Execute the real gameplay effect.
- Apply particles, sounds, and animations.
- Apply cooldown only when activation succeeds.
- Send useful feedback to the player.
- Handle invalid targets, unloaded chunks, offline players, and interrupted tasks safely.
Do not silently swallow exceptions. Log meaningful errors and provide useful debug mode output.
8. IMPLEMENT ALL 140 ABILITIES
Create a structured ability registry. Each of the 14 powers must register exactly 10 abilities.
Every ability definition must include:
- Unique ability ID.
- Display name.
- Description.
- Icon material.
- Cooldown.
- Range or radius, if relevant.
- Damage, healing, duration, or other gameplay values, if relevant.
- Activation requirements.
- Execution handler.
- Particle and sound configuration.
- Targeting rules.
- Permission and world restrictions, where applicable.
Use reusable mechanics where appropriate, but each ability must have its own properly implemented behavior.
Do not create empty handlers, TODO implementations, fake effects, or placeholder methods that claim to execute abilities.
If an ability cannot be implemented reliably, report the limitation instead of pretending it works.
9. ADVANCED VISUAL EFFECTS
Make the plugin visually impressive without causing server lag.
Include:
- Element-specific particle effects.
- Sound effects.
- Projectile trails.
- Impact animations.
- Custom titles and action-bar feedback.
- Cooldown feedback.
- Elemental activation sequences.
- Distinct effects for fire, water, earth, ice, lightning, wind, and magical powers.
- Configurable particle counts and effect quality.
- A low-effects mode for performance-sensitive servers.
Use particle and sound APIs compatible with the declared target versions.
Do not depend on client-side texture packs for basic functionality. The plugin must remain playable without a resource pack.
10. COOLDOWNS AND BALANCING
Create configurable cooldowns for every ability.
Requirements:
- Show remaining cooldown time.
- Prevent ability spam.
- Avoid duplicate cooldown timers.
- Use safe time calculations.
- Store temporary runtime state efficiently.
- Clean up expired or abandoned runtime data.
- Make damage, range, duration, knockback, and cooldown values configurable.
Balance the powers for SMP gameplay. Powerful abilities should have meaningful cooldowns and counterplay.
11. PLAYER DATA
Persist:
- Player UUID.
- Assigned power.
- Selected abilities, if applicable.
- Spin status.
- Relevant progression data.
- Other necessary settings.
Requirements:
- Save immediately after important changes.
- Load data safely when players join.
- Never reset an existing power on every login.
- Handle corrupted or missing data gracefully.
- Avoid blocking the main thread with expensive file operations.
- Use UUIDs rather than player names as primary identifiers.
12. COMMANDS
Implement these commands with tab completion and permission checks:
/ep help
/ep info [player]
/ep powers
/ep gui
/ep ability
/ep spin
/ep give <player> <power>
/ep remove <player>
/ep set <player> <power>
/ep reset <player>
/ep reload
/ep cooldown <player> <ability>
/ep debug
The /ep spin command must respect the configured spin policy.
All administrative commands must validate arguments, player availability, power IDs, and permissions.
Include clear success and error messages.
13. PERMISSIONS
Implement configurable permissions such as:
elementalpower.useelementalpower.spinelementalpower.adminelementalpower.admin.giveelementalpower.admin.removeelementalpower.admin.reloadelementalpower.bypass.cooldown
Regular players must not gain administrative privileges.
14. CONFIGURATION
Provide a complete config.yml with settings for:
- Default power assignment.
- Random spinning.
- Spin animation duration.
- Power Core item.
- GUI design.
- Cooldowns.
- Ability damage and ranges.
- Particle quality.
- Sound effects.
- World restrictions.
- PvP behavior.
- Protected regions.
- Death and respawn handling.
- Debug mode.
- Messages.
- Language customization.
Provide a powers.yml containing all 14 powers and their 10 ability definitions each.
Validate configuration values and use safe defaults if values are missing or invalid.
15. PVP AND SERVER SAFETY
- Respect disabled PvP and applicable server protection rules.
- Avoid damaging the ability user unless explicitly intended.
- Prevent accidental damage to protected entities or regions where integration is available.
- Check line of sight and range for abilities where relevant.
- Avoid loading chunks unnecessarily.
- Avoid excessive entity spawning.
- Prevent duplicate ability execution.
- Avoid unsafe asynchronous Bukkit API calls.
- Cancel scheduled tasks when appropriate.
- Avoid memory leaks and unbounded task creation.
- Provide an option to disable abilities in selected worlds.
If WorldGuard integration is included, make it optional and document the dependency.
16. TESTING AND BUG FIXING
Create a practical test plan covering:
- Fresh player joins.
- Existing player rejoins.
- Spin animation completion.
- Repeated spin clicks.
- Full inventories.
- Power Core duplication attempts.
- GUI item movement attempts.
- All 14 power assignments.
- All 140 ability activation handlers.
- Cooldown enforcement.
- Death and respawn.
- Server restart and data persistence.
- Missing or corrupted configuration.
- Minecraft version compatibility.
- PvP restrictions.
- High player counts and performance.
Compile the project with Maven. Fix compilation errors, dependency errors, event-handling issues, and runtime errors before delivery.
Provide automated tests for the parts that can be tested without a live Minecraft server and an integration-testing checklist for the remaining behaviors.
Do not report tests as passed unless they were actually executed.
17. REQUIRED PROJECT STRUCTURE
Organize the project into maintainable classes, including:
ElementalPower.javaPowerManager.javaAbilityManager.javaAbilityRegistry.javaAbility.javaAbilityContext.javaCooldownManager.javaPlayerDataManager.javaPowerSpinManager.javaPowerCoreManager.javaAbilityGUI.javaPowerGUI.javaPowerItemListener.javaPlayerJoinListener.javaPlayerDeathListener.javaInventoryListener.javaAbilityListener.javaPowerCommand.javaConfigManager.javaParticleManager.javaSoundManager.java
Use additional classes when they improve code quality.
18. FINAL DELIVERABLES
Provide:
- Complete Java source code.
- Maven
pom.xml. - Correct
plugin.yml. - Complete
config.yml. - Complete
powers.yml. - All 140 functional ability implementations.
- Player data and cooldown systems.
- GUI and spin systems.
- Permissions and commands.
- Build instructions.
- Installation instructions.
- Testing results and known limitations.
- The compiled plugin JAR, if the build environment supports compilation.
Do not stop after producing a design document, a few Java examples, or a basic prototype. Build the complete project, compile it, test what can be tested, and clearly identify any remaining work.
FINAL GOAL: Deliver a polished ElementalPower plugin for POWER SMP with Minecraft 1.21+ compatibility, 14 elemental powers, 140 genuinely functional abilities, an animated join-to-spin system, automatic Power Core delivery, an interactive ability GUI, advanced visual effects, reliable cooldowns, persistent player data, and robust error handling.
Should I create this as a new Paper plugin project, or is it for an existing project you can add to this workspace?
๐
pasted-code-1793285231029.txt
txt
394 lines
โถ
# โก ELEMENTALPOWER โ COMPLETE ADVANCED MINECRAFT PLUGIN
## 1. PROJECT OVERVIEW
Build a complete, professional, production-quality Minecraft Java plugin named **ElementalPower** for my server, **POWER SMP**.
The plugin must support **Minecraft 1.21 and newer compatible versions**, using Paper API and Java. Use Maven for project management and provide the complete, compilable source code.
**CRITICAL REQUIREMENT:** Do not create a plugin that only looks good or contains placeholder abilities. Every implemented ability must perform its intended gameplay effect. Fix all event handlers, inventory interactions, cooldowns, power assignments, and ability execution logic.
Do not claim the plugin is 100% bug-free without testing it.
## 2. TECHNICAL REQUIREMENTS
- Plugin name: ElementalPower
- Main package: `com.darkskgamer.elementalpower`
- Main class: `com.darkskgamer.elementalpower.ElementalPower`
- Target platform: Paper Minecraft 1.21+
- Language: Java
- Build system: Maven
- Use a compatible Java version for the selected Paper API.
- Include `plugin.yml`, `config.yml`, `powers.yml`, and other necessary resource files.
- Use supported Bukkit/Paper APIs and avoid deprecated or version-fragile methods where possible.
- Store player data persistently using YAML or another appropriate local storage solution.
- Make the plugin configurable, maintainable, and efficient.
- Handle player deaths, respawns, reconnects, inventory-full situations, and server restarts correctly.
If different Minecraft versions require different API behavior, document the supported version range and implement compatibility deliberately.
## 3. FOURTEEN ELEMENTAL POWERS
Implement exactly 14 distinct powers, each with 10 unique, functional abilities.
1. FIRE โ burning attacks, fire projectiles, flame bursts, fire resistance.
2. WATER โ water projectiles, healing, water waves, defensive currents.
3. EARTH โ stone attacks, ground shockwaves, defensive barriers, knockback.
4. NATURE โ vines, roots, regeneration, nature-based area control.
5. ICE โ freezing effects, ice projectiles, slowing fields, ice barriers.
6. LIGHTNING โ lightning strikes, chain damage, speed boosts, electrical bursts.
7. WIND โ gusts, air projectiles, jumps, controlled knockback.
8. GRAVITY โ controlled pulls, pushes, levitation, gravity-themed area effects.
9. SHADOW โ dark projectiles, temporary invisibility, darkness effects, shadow movement.
10. LIGHT โ radiant projectiles, illumination, healing, protective effects.
11. CRYSTAL โ crystal projectiles, reflective-style defenses, crystal bursts.
12. METAL โ metallic projectiles, defensive armor effects, impact attacks.
13. SOLAR โ solar blasts, radiant bursts, temporary buffs, area damage.
14. ARCANE โ magical projectiles, teleportation-style movement, arcane shields.
Each power must have 10 genuinely distinct abilities, for a total of **140 implemented abilities**.
Do not count renamed copies of the same ability as unique abilities. Each ability must have its own name, description, effect, cooldown, activation logic, and configuration.
## 4. JOIN-TO-SPIN SYSTEM
When a player joins for the first time:
1. Check whether the player already owns a power.
2. If not, give them a specially named Power Spin item.
3. Use a visually attractive enchanted item with custom name, lore, and particles where appropriate.
4. Tell the player how to use it.
5. Clicking the item must open a power-selection or spinning interface.
6. Animate the spin using inventory updates, sounds, and visual effects.
7. Select one of the 14 powers randomly.
8. Assign the selected power permanently.
9. Save the player's power immediately.
10. Replace or remove the spin item safely.
11. Give the player their assigned Power Core item immediately.
12. Display a title, subtitle, chat message, sound, and suitable elemental effects.
Prevent players from receiving multiple powers because of reconnects, repeated clicks, or duplicate event execution.
The spin must not block the main server thread with delays or loops. Use safe scheduled tasks and cancel them when appropriate.
Provide an admin-configurable option to allow players to spin again.
## 5. POWER CORE ITEM
Every player who owns a power must receive a special Power Core item.
Requirements:
- Unique display name and lore based on the assigned element.
- Enchantment glint or another visual enhancement.
- Correct item identification using PersistentDataContainer rather than the item's display name alone.
- Safe handling of item movement, dropping, inventory swapping, death, and respawning.
- No accidental duplication.
- A configurable option to restore a missing Power Core.
- Power-specific color styling where supported.
When a player right-clicks the Power Core, open the ability GUI for their assigned power.
When a player left-clicks with the item, do not accidentally trigger unrelated vanilla actions or break blocks if the item is configured as a protected ability tool.
## 6. ABILITY GUI
Create a polished inventory-based GUI.
The main GUI must display:
- Power name and element.
- All 10 abilities belonging to that power.
- Ability icons.
- Ability descriptions.
- Cooldown information.
- Activation instructions.
- Locked or unavailable ability status, if applicable.
- Back and close buttons.
- Appropriate decorative borders.
Clicking an ability must select or activate it according to the configured control system.
Use inventory click and drag event handlers correctly. Prevent GUI items from being taken, moved, or duplicated.
Identify custom GUI inventories safely. Never assume that every inventory with a matching title belongs to the plugin.
Handle invalid slots, shift-clicks, number-key swaps, offhand swaps, double-clicks, and drag events.
## 7. ABILITY ACTIVATION SYSTEM
Implement a reliable ability manager.
Provide at least these activation methods:
- Right-click the Power Core to open the ability GUI.
- Click an ability to activate it.
- Optional configurable hotbar ability selection.
- Sneak-and-click activation where practical and conflict-free.
- Commands to select or activate abilities.
Use Bukkit/Paper events and scheduled tasks correctly.
Every ability must:
1. Confirm that the player has an assigned power.
2. Confirm that the requested ability belongs to that power.
3. Check cooldown and other requirements.
4. Check whether the player is allowed to use abilities in the current situation.
5. Execute the real gameplay effect.
6. Apply particles, sounds, and animations.
7. Apply cooldown only when activation succeeds.
8. Send useful feedback to the player.
9. Handle invalid targets, unloaded chunks, offline players, and interrupted tasks safely.
Do not silently swallow exceptions. Log meaningful errors and provide useful debug mode output.
## 8. IMPLEMENT ALL 140 ABILITIES
Create a structured ability registry. Each of the 14 powers must register exactly 10 abilities.
Every ability definition must include:
- Unique ability ID.
- Display name.
- Description.
- Icon material.
- Cooldown.
- Range or radius, if relevant.
- Damage, healing, duration, or other gameplay values, if relevant.
- Activation requirements.
- Execution handler.
- Particle and sound configuration.
- Targeting rules.
- Permission and world restrictions, where applicable.
Use reusable mechanics where appropriate, but each ability must have its own properly implemented behavior.
Do not create empty handlers, TODO implementations, fake effects, or placeholder methods that claim to execute abilities.
If an ability cannot be implemented reliably, report the limitation instead of pretending it works.
## 9. ADVANCED VISUAL EFFECTS
Make the plugin visually impressive without causing server lag.
Include:
- Element-specific particle effects.
- Sound effects.
- Projectile trails.
- Impact animations.
- Custom titles and action-bar feedback.
- Cooldown feedback.
- Elemental activation sequences.
- Distinct effects for fire, water, earth, ice, lightning, wind, and magical powers.
- Configurable particle counts and effect quality.
- A low-effects mode for performance-sensitive servers.
Use particle and sound APIs compatible with the declared target versions.
Do not depend on client-side texture packs for basic functionality. The plugin must remain playable without a resource pack.
## 10. COOLDOWNS AND BALANCING
Create configurable cooldowns for every ability.
Requirements:
- Show remaining cooldown time.
- Prevent ability spam.
- Avoid duplicate cooldown timers.
- Use safe time calculations.
- Store temporary runtime state efficiently.
- Clean up expired or abandoned runtime data.
- Make damage, range, duration, knockback, and cooldown values configurable.
Balance the powers for SMP gameplay. Powerful abilities should have meaningful cooldowns and counterplay.
## 11. PLAYER DATA
Persist:
- Player UUID.
- Assigned power.
- Selected abilities, if applicable.
- Spin status.
- Relevant progression data.
- Other necessary settings.
Requirements:
- Save immediately after important changes.
- Load data safely when players join.
- Never reset an existing power on every login.
- Handle corrupted or missing data gracefully.
- Avoid blocking the main thread with expensive file operations.
- Use UUIDs rather than player names as primary identifiers.
## 12. COMMANDS
Implement these commands with tab completion and permission checks:
`/ep help`
`/ep info [player]`
`/ep powers`
`/ep gui`
`/ep ability`
`/ep spin`
`/ep give `
`/ep remove `
`/ep set `
`/ep reset `
`/ep reload`
`/ep cooldown `
`/ep debug`
The `/ep spin` command must respect the configured spin policy.
All administrative commands must validate arguments, player availability, power IDs, and permissions.
Include clear success and error messages.
## 13. PERMISSIONS
Implement configurable permissions such as:
- `elementalpower.use`
- `elementalpower.spin`
- `elementalpower.admin`
- `elementalpower.admin.give`
- `elementalpower.admin.remove`
- `elementalpower.admin.reload`
- `elementalpower.bypass.cooldown`
Regular players must not gain administrative privileges.
## 14. CONFIGURATION
Provide a complete `config.yml` with settings for:
- Default power assignment.
- Random spinning.
- Spin animation duration.
- Power Core item.
- GUI design.
- Cooldowns.
- Ability damage and ranges.
- Particle quality.
- Sound effects.
- World restrictions.
- PvP behavior.
- Protected regions.
- Death and respawn handling.
- Debug mode.
- Messages.
- Language customization.
Provide a `powers.yml` containing all 14 powers and their 10 ability definitions each.
Validate configuration values and use safe defaults if values are missing or invalid.
## 15. PVP AND SERVER SAFETY
- Respect disabled PvP and applicable server protection rules.
- Avoid damaging the ability user unless explicitly intended.
- Prevent accidental damage to protected entities or regions where integration is available.
- Check line of sight and range for abilities where relevant.
- Avoid loading chunks unnecessarily.
- Avoid excessive entity spawning.
- Prevent duplicate ability execution.
- Avoid unsafe asynchronous Bukkit API calls.
- Cancel scheduled tasks when appropriate.
- Avoid memory leaks and unbounded task creation.
- Provide an option to disable abilities in selected worlds.
If WorldGuard integration is included, make it optional and document the dependency.
## 16. TESTING AND BUG FIXING
Create a practical test plan covering:
- Fresh player joins.
- Existing player rejoins.
- Spin animation completion.
- Repeated spin clicks.
- Full inventories.
- Power Core duplication attempts.
- GUI item movement attempts.
- All 14 power assignments.
- All 140 ability activation handlers.
- Cooldown enforcement.
- Death and respawn.
- Server restart and data persistence.
- Missing or corrupted configuration.
- Minecraft version compatibility.
- PvP restrictions.
- High player counts and performance.
Compile the project with Maven. Fix compilation errors, dependency errors, event-handling issues, and runtime errors before delivery.
Provide automated tests for the parts that can be tested without a live Minecraft server and an integration-testing checklist for the remaining behaviors.
Do not report tests as passed unless they were actually executed.
## 17. REQUIRED PROJECT STRUCTURE
Organize the project into maintainable classes, including:
- `ElementalPower.java`
- `PowerManager.java`
- `AbilityManager.java`
- `AbilityRegistry.java`
- `Ability.java`
- `AbilityContext.java`
- `CooldownManager.java`
- `PlayerDataManager.java`
- `PowerSpinManager.java`
- `PowerCoreManager.java`
- `AbilityGUI.java`
- `PowerGUI.java`
- `PowerItemListener.java`
- `PlayerJoinListener.java`
- `PlayerDeathListener.java`
- `InventoryListener.java`
- `AbilityListener.java`
- `PowerCommand.java`
- `ConfigManager.java`
- `ParticleManager.java`
- `SoundManager.java`
Use additional classes when they improve code quality.
## 18. FINAL DELIVERABLES
Provide:
1. Complete Java source code.
2. Maven `pom.xml`.
3. Correct `plugin.yml`.
4. Complete `config.yml`.
5. Complete `powers.yml`.
6. All 140 functional ability implementations.
7. Player data and cooldown systems.
8. GUI and spin systems.
9. Permissions and commands.
10. Build instructions.
11. Installation instructions.
12. Testing results and known limitations.
13. The compiled plugin JAR, if the build environment supports compilation.
Do not stop after producing a design document, a few Java examples, or a basic prototype. Build the complete project, compile it, test what can be tested, and clearly identify any remaining work.
**FINAL GOAL:** Deliver a polished ElementalPower plugin for POWER SMP with Minecraft 1.21+ compatibility, 14 elemental powers, 140 genuinely functional abilities, an animated join-to-spin system, automatic Power Core delivery, an interactive ability GUI, advanced visual effects, reliable cooldowns, persistent player data, and robust error handling.
Iโve got the ElementalPower requirements. Should I create it as a new Paper plugin project, or is it for an existing project you can add to this workspace?
๐
pasted-code-1793285254609.txt
txt
394 lines
โถ
# โก ELEMENTALPOWER โ COMPLETE ADVANCED MINECRAFT PLUGIN
## 1. PROJECT OVERVIEW
Build a complete, professional, production-quality Minecraft Java plugin named **ElementalPower** for my server, **POWER SMP**.
The plugin must support **Minecraft 1.21 and newer compatible versions**, using Paper API and Java. Use Maven for project management and provide the complete, compilable source code.
**CRITICAL REQUIREMENT:** Do not create a plugin that only looks good or contains placeholder abilities. Every implemented ability must perform its intended gameplay effect. Fix all event handlers, inventory interactions, cooldowns, power assignments, and ability execution logic.
Do not claim the plugin is 100% bug-free without testing it.
## 2. TECHNICAL REQUIREMENTS
- Plugin name: ElementalPower
- Main package: `com.darkskgamer.elementalpower`
- Main class: `com.darkskgamer.elementalpower.ElementalPower`
- Target platform: Paper Minecraft 1.21+
- Language: Java
- Build system: Maven
- Use a compatible Java version for the selected Paper API.
- Include `plugin.yml`, `config.yml`, `powers.yml`, and other necessary resource files.
- Use supported Bukkit/Paper APIs and avoid deprecated or version-fragile methods where possible.
- Store player data persistently using YAML or another appropriate local storage solution.
- Make the plugin configurable, maintainable, and efficient.
- Handle player deaths, respawns, reconnects, inventory-full situations, and server restarts correctly.
If different Minecraft versions require different API behavior, document the supported version range and implement compatibility deliberately.
## 3. FOURTEEN ELEMENTAL POWERS
Implement exactly 14 distinct powers, each with 10 unique, functional abilities.
1. FIRE โ burning attacks, fire projectiles, flame bursts, fire resistance.
2. WATER โ water projectiles, healing, water waves, defensive currents.
3. EARTH โ stone attacks, ground shockwaves, defensive barriers, knockback.
4. NATURE โ vines, roots, regeneration, nature-based area control.
5. ICE โ freezing effects, ice projectiles, slowing fields, ice barriers.
6. LIGHTNING โ lightning strikes, chain damage, speed boosts, electrical bursts.
7. WIND โ gusts, air projectiles, jumps, controlled knockback.
8. GRAVITY โ controlled pulls, pushes, levitation, gravity-themed area effects.
9. SHADOW โ dark projectiles, temporary invisibility, darkness effects, shadow movement.
10. LIGHT โ radiant projectiles, illumination, healing, protective effects.
11. CRYSTAL โ crystal projectiles, reflective-style defenses, crystal bursts.
12. METAL โ metallic projectiles, defensive armor effects, impact attacks.
13. SOLAR โ solar blasts, radiant bursts, temporary buffs, area damage.
14. ARCANE โ magical projectiles, teleportation-style movement, arcane shields.
Each power must have 10 genuinely distinct abilities, for a total of **140 implemented abilities**.
Do not count renamed copies of the same ability as unique abilities. Each ability must have its own name, description, effect, cooldown, activation logic, and configuration.
## 4. JOIN-TO-SPIN SYSTEM
When a player joins for the first time:
1. Check whether the player already owns a power.
2. If not, give them a specially named Power Spin item.
3. Use a visually attractive enchanted item with custom name, lore, and particles where appropriate.
4. Tell the player how to use it.
5. Clicking the item must open a power-selection or spinning interface.
6. Animate the spin using inventory updates, sounds, and visual effects.
7. Select one of the 14 powers randomly.
8. Assign the selected power permanently.
9. Save the player's power immediately.
10. Replace or remove the spin item safely.
11. Give the player their assigned Power Core item immediately.
12. Display a title, subtitle, chat message, sound, and suitable elemental effects.
Prevent players from receiving multiple powers because of reconnects, repeated clicks, or duplicate event execution.
The spin must not block the main server thread with delays or loops. Use safe scheduled tasks and cancel them when appropriate.
Provide an admin-configurable option to allow players to spin again.
## 5. POWER CORE ITEM
Every player who owns a power must receive a special Power Core item.
Requirements:
- Unique display name and lore based on the assigned element.
- Enchantment glint or another visual enhancement.
- Correct item identification using PersistentDataContainer rather than the item's display name alone.
- Safe handling of item movement, dropping, inventory swapping, death, and respawning.
- No accidental duplication.
- A configurable option to restore a missing Power Core.
- Power-specific color styling where supported.
When a player right-clicks the Power Core, open the ability GUI for their assigned power.
When a player left-clicks with the item, do not accidentally trigger unrelated vanilla actions or break blocks if the item is configured as a protected ability tool.
## 6. ABILITY GUI
Create a polished inventory-based GUI.
The main GUI must display:
- Power name and element.
- All 10 abilities belonging to that power.
- Ability icons.
- Ability descriptions.
- Cooldown information.
- Activation instructions.
- Locked or unavailable ability status, if applicable.
- Back and close buttons.
- Appropriate decorative borders.
Clicking an ability must select or activate it according to the configured control system.
Use inventory click and drag event handlers correctly. Prevent GUI items from being taken, moved, or duplicated.
Identify custom GUI inventories safely. Never assume that every inventory with a matching title belongs to the plugin.
Handle invalid slots, shift-clicks, number-key swaps, offhand swaps, double-clicks, and drag events.
## 7. ABILITY ACTIVATION SYSTEM
Implement a reliable ability manager.
Provide at least these activation methods:
- Right-click the Power Core to open the ability GUI.
- Click an ability to activate it.
- Optional configurable hotbar ability selection.
- Sneak-and-click activation where practical and conflict-free.
- Commands to select or activate abilities.
Use Bukkit/Paper events and scheduled tasks correctly.
Every ability must:
1. Confirm that the player has an assigned power.
2. Confirm that the requested ability belongs to that power.
3. Check cooldown and other requirements.
4. Check whether the player is allowed to use abilities in the current situation.
5. Execute the real gameplay effect.
6. Apply particles, sounds, and animations.
7. Apply cooldown only when activation succeeds.
8. Send useful feedback to the player.
9. Handle invalid targets, unloaded chunks, offline players, and interrupted tasks safely.
Do not silently swallow exceptions. Log meaningful errors and provide useful debug mode output.
## 8. IMPLEMENT ALL 140 ABILITIES
Create a structured ability registry. Each of the 14 powers must register exactly 10 abilities.
Every ability definition must include:
- Unique ability ID.
- Display name.
- Description.
- Icon material.
- Cooldown.
- Range or radius, if relevant.
- Damage, healing, duration, or other gameplay values, if relevant.
- Activation requirements.
- Execution handler.
- Particle and sound configuration.
- Targeting rules.
- Permission and world restrictions, where applicable.
Use reusable mechanics where appropriate, but each ability must have its own properly implemented behavior.
Do not create empty handlers, TODO implementations, fake effects, or placeholder methods that claim to execute abilities.
If an ability cannot be implemented reliably, report the limitation instead of pretending it works.
## 9. ADVANCED VISUAL EFFECTS
Make the plugin visually impressive without causing server lag.
Include:
- Element-specific particle effects.
- Sound effects.
- Projectile trails.
- Impact animations.
- Custom titles and action-bar feedback.
- Cooldown feedback.
- Elemental activation sequences.
- Distinct effects for fire, water, earth, ice, lightning, wind, and magical powers.
- Configurable particle counts and effect quality.
- A low-effects mode for performance-sensitive servers.
Use particle and sound APIs compatible with the declared target versions.
Do not depend on client-side texture packs for basic functionality. The plugin must remain playable without a resource pack.
## 10. COOLDOWNS AND BALANCING
Create configurable cooldowns for every ability.
Requirements:
- Show remaining cooldown time.
- Prevent ability spam.
- Avoid duplicate cooldown timers.
- Use safe time calculations.
- Store temporary runtime state efficiently.
- Clean up expired or abandoned runtime data.
- Make damage, range, duration, knockback, and cooldown values configurable.
Balance the powers for SMP gameplay. Powerful abilities should have meaningful cooldowns and counterplay.
## 11. PLAYER DATA
Persist:
- Player UUID.
- Assigned power.
- Selected abilities, if applicable.
- Spin status.
- Relevant progression data.
- Other necessary settings.
Requirements:
- Save immediately after important changes.
- Load data safely when players join.
- Never reset an existing power on every login.
- Handle corrupted or missing data gracefully.
- Avoid blocking the main thread with expensive file operations.
- Use UUIDs rather than player names as primary identifiers.
## 12. COMMANDS
Implement these commands with tab completion and permission checks:
`/ep help`
`/ep info [player]`
`/ep powers`
`/ep gui`
`/ep ability`
`/ep spin`
`/ep give `
`/ep remove `
`/ep set `
`/ep reset `
`/ep reload`
`/ep cooldown `
`/ep debug`
The `/ep spin` command must respect the configured spin policy.
All administrative commands must validate arguments, player availability, power IDs, and permissions.
Include clear success and error messages.
## 13. PERMISSIONS
Implement configurable permissions such as:
- `elementalpower.use`
- `elementalpower.spin`
- `elementalpower.admin`
- `elementalpower.admin.give`
- `elementalpower.admin.remove`
- `elementalpower.admin.reload`
- `elementalpower.bypass.cooldown`
Regular players must not gain administrative privileges.
## 14. CONFIGURATION
Provide a complete `config.yml` with settings for:
- Default power assignment.
- Random spinning.
- Spin animation duration.
- Power Core item.
- GUI design.
- Cooldowns.
- Ability damage and ranges.
- Particle quality.
- Sound effects.
- World restrictions.
- PvP behavior.
- Protected regions.
- Death and respawn handling.
- Debug mode.
- Messages.
- Language customization.
Provide a `powers.yml` containing all 14 powers and their 10 ability definitions each.
Validate configuration values and use safe defaults if values are missing or invalid.
## 15. PVP AND SERVER SAFETY
- Respect disabled PvP and applicable server protection rules.
- Avoid damaging the ability user unless explicitly intended.
- Prevent accidental damage to protected entities or regions where integration is available.
- Check line of sight and range for abilities where relevant.
- Avoid loading chunks unnecessarily.
- Avoid excessive entity spawning.
- Prevent duplicate ability execution.
- Avoid unsafe asynchronous Bukkit API calls.
- Cancel scheduled tasks when appropriate.
- Avoid memory leaks and unbounded task creation.
- Provide an option to disable abilities in selected worlds.
If WorldGuard integration is included, make it optional and document the dependency.
## 16. TESTING AND BUG FIXING
Create a practical test plan covering:
- Fresh player joins.
- Existing player rejoins.
- Spin animation completion.
- Repeated spin clicks.
- Full inventories.
- Power Core duplication attempts.
- GUI item movement attempts.
- All 14 power assignments.
- All 140 ability activation handlers.
- Cooldown enforcement.
- Death and respawn.
- Server restart and data persistence.
- Missing or corrupted configuration.
- Minecraft version compatibility.
- PvP restrictions.
- High player counts and performance.
Compile the project with Maven. Fix compilation errors, dependency errors, event-handling issues, and runtime errors before delivery.
Provide automated tests for the parts that can be tested without a live Minecraft server and an integration-testing checklist for the remaining behaviors.
Do not report tests as passed unless they were actually executed.
## 17. REQUIRED PROJECT STRUCTURE
Organize the project into maintainable classes, including:
- `ElementalPower.java`
- `PowerManager.java`
- `AbilityManager.java`
- `AbilityRegistry.java`
- `Ability.java`
- `AbilityContext.java`
- `CooldownManager.java`
- `PlayerDataManager.java`
- `PowerSpinManager.java`
- `PowerCoreManager.java`
- `AbilityGUI.java`
- `PowerGUI.java`
- `PowerItemListener.java`
- `PlayerJoinListener.java`
- `PlayerDeathListener.java`
- `InventoryListener.java`
- `AbilityListener.java`
- `PowerCommand.java`
- `ConfigManager.java`
- `ParticleManager.java`
- `SoundManager.java`
Use additional classes when they improve code quality.
## 18. FINAL DELIVERABLES
Provide:
1. Complete Java source code.
2. Maven `pom.xml`.
3. Correct `plugin.yml`.
4. Complete `config.yml`.
5. Complete `powers.yml`.
6. All 140 functional ability implementations.
7. Player data and cooldown systems.
8. GUI and spin systems.
9. Permissions and commands.
10. Build instructions.
11. Installation instructions.
12. Testing results and known limitations.
13. The compiled plugin JAR, if the build environment supports compilation.
Do not stop after producing a design document, a few Java examples, or a basic prototype. Build the complete project, compile it, test what can be tested, and clearly identify any remaining work.
**FINAL GOAL:** Deliver a polished ElementalPower plugin for POWER SMP with Minecraft 1.21+ compatibility, 14 elemental powers, 140 genuinely functional abilities, an animated join-to-spin system, automatic Power Core delivery, an interactive ability GUI, advanced visual effects, reliable cooldowns, persistent player data, and robust error handling.
Iโve started updating the existing ElementalPowers project to match your ElementalPower specification, including the 14 powers, ability system, spin/core flow, GUI, and commands. Iโll compile the project after the implementation is finished and report any remaining limitations.
Iโve restarted the implementation in the existing ElementalPowers project after the earlier task was cancelled. Once it finishes, Iโll compile the updated project and report the build result and any limitations.
โฆUpdated the project to the ElementalPower identity and com.darkskgamer.elementalpower.ElementalPower entry point, targeting Java 21 and Paper API 1.21.4.
Added all 14 requested elements and 140 unique ability definitions in
powers.yml, with validation and bundled-definition fallback. Ability casting now uses bounded, element-specific gameplay effects, ownership and activation checks, PvP/PvE and world rules, and cooldowns applied only after successful casts.Hardened the spin and core flows: first-join assignments are persisted before the scheduled animation; repeat spins follow configuration; core and GUI spin items use PDC tags; protected GUIs block item-transfer exploits; and missing cores can be restored, including after a full inventory becomes usable.
Replaced the command surface with
/epcommands and fine-grained admin permissions. Updatedconfig.yml,plugin.yml, Maven metadata, and README installation, migration, compatibility, and integration-checklist documentation.
Legacy UUID profiles are copied from plugins/ElementalPowers/players when the new destination file is absent; the old folder is left intact. Cooldowns are memory-only and reset on restart. No Maven compile or server runtime verification was run, and no automated tests were added.
The ElementalPower project has been updated in the existing ElementalPowers workspace project, and its build compiled successfully.
It now includes the ElementalPower plugin identity, targets Java 21 / Paper API 1.21.4, and contains 14 powers with 140 ability definitions, plus the spin/core flow, ability GUI, /ep commands, configuration, and installation and integration-checklist documentation.
Verification and limitations: Compilation succeeded, but no live-server or runtime tests were performed, so gameplay behavior is not confirmed. Cooldowns are memory-only and reset when the server restarts. Paper 1.21.4 is the configured build target; compatibility with other 1.21+ releases has not been verified.
No files in this session