MASTER PROMPT — MINECRAFT BEDROCK ELEMENTAL SMP PLUGIN
You are an expert Minecraft Bedrock server developer, gameplay programmer, UI/UX developer, resource-pack creator, animator, sound designer, and QA engineer.
Build a complete, production-ready Elemental SMP system for Minecraft Bedrock servers.
Do not give me a concept, mockup, pseudocode, or incomplete prototype. Generate the complete working project with all required source files, configuration, UI, resource-pack assets, animations, particles, sounds, commands, persistent data, and documentation.
First determine the exact Bedrock server software/API being targeted. Prefer a modern, actively supported Bedrock server plugin architecture. If the environment is PocketMine-MP, use the currently supported API and PHP conventions. Avoid deprecated APIs.
---
- CORE CONCEPT
Every player joining the SMP for the first time receives exactly one random elemental affinity.
There are exactly 5 elements:
- FIRE
- WATER
- WIND / AIR
- LIGHTNING
- SHADOW
The assigned element is permanently saved.
A player must keep the same element after:
- reconnecting
- dying
- respawning
- changing worlds
- server restart
- server crash/restart recovery
The element must not be randomly reassigned.
---
- VERY IMPORTANT — ELEMENTAL DAMAGE IMMUNITY
Implement a server-authoritative elemental immunity system.
A player is completely immune to damage caused by their own element.
Examples:
FIRE player
A Fire player cannot be damaged by Fire abilities/effects created by any source.
That includes, where technically identifiable:
- Fireball
- Flame Burst
- Fire Wall
- Meteor
- Inferno
- elemental fire particles/effects that directly cause damage
WATER player
A Water player cannot be damaged by Water elemental abilities from another player.
WIND/AIR player
A Wind/Air player cannot be damaged by Wind/Air elemental attacks.
LIGHTNING player
A Lightning player cannot be damaged by Lightning elemental attacks.
SHADOW player
A Shadow player cannot be damaged by Shadow elemental attacks.
This immunity must work even when the attacker is another player.
---
- ELEMENTAL COMBAT RULE
Same-element players are NOT generally immune to each other.
The immunity is specifically:
«A player cannot be damaged by the elemental power of the element they own.»
Example:
Player A = WIND Player B = WIND
Player A attacks Player B using Wind Slash.
Player B MUST TAKE DAMAGE because Wind-vs-Wind PvP is allowed.
Player B attacks Player A using Wind Slash.
Player A MUST TAKE DAMAGE for the same reason.
Therefore:
SELF ELEMENT IMMUNITY
The ability's caster/owner cannot be damaged by their own elemental power.
SAME-ELEMENT PvP
Two players who share the same element can still damage one another using that element.
DIFFERENT-ELEMENT PvP
Players with different elements can damage each other normally according to the ability's damage/effects.
This distinction is extremely important.
Do NOT implement:
"Fire player = immune to all Fire damage"
in a way that also makes Fire-vs-Fire PvP impossible.
Instead, identify the source/caster of the elemental ability.
The caster must be immune to damage caused by their own elemental ability.
Another player, even with the same element, must remain damageable.
---
- ABILITY SOURCE TRACKING
Every offensive elemental ability must carry/source-track:
- caster unique ID
- caster element
- ability ID
- ability level
- damage type
- elemental type
When damage is generated:
- Detect the ability source.
- Detect the actual target.
- If target unique ID == caster unique ID:
- cancel elemental self-damage.
- Otherwise:
- apply normal damage rules.
Do not simply cancel all damage of the same elemental type.
This is required so that:
Fire player A → Fireball → Fire player B
still causes damage.
But:
Fire player A → Fireball → Fire player A
does not cause elemental self-damage.
The same logic applies to all five elements.
---
- SECONDARY / AREA DAMAGE
The same self-immunity rule must apply to:
- area explosions
- AoE abilities
- lingering zones
- traps
- projectiles
- chain attacks
- storms
- fire zones
- water zones
- tornadoes
- lightning areas
- shadow zones
- delayed damage
- damage-over-time effects
Example:
A Fire player activates Inferno.
If the Inferno damages its caster indirectly:
Cancel that damage.
If Inferno damages another Fire player:
Apply damage normally.
If Inferno damages a Water/Wind/Lightning/Shadow player:
Apply damage normally.
---
- SPECIAL FIRST-PLAYER REWARD
The first player who ever joins the SMP receives:
INFINITE MANA
Only ONE player can ever have this reward automatically.
Requirements:
- Detect the first successful player registration/join.
- Save the player's unique server-supported identifier.
- Save "firstInfiniteManaOwner".
- Set "infiniteMana = true".
- Infinite mana never runs out.
- Abilities can be used without reducing effective mana.
- Overlay displays:
"∞ / ∞ MANA"
- Server restart must not reset ownership.
- The reward must never automatically transfer to another player.
- Name alone must not be used as the permanent identity key.
- Provide admin controls to grant/revoke infinite mana when supported.
The first player still receives their normal random element and starts with that element at Level 1 unless configured otherwise.
---
- MANA SYSTEM
Normal players:
Maximum Mana
"200"
Variables:
"currentMana"
"maxMana = 200"
Infinite-mana player:
"infiniteMana = true"
Normal ability costs:
- Low tier: 15–25
- Mid tier: 30–50
- High tier: 65–75
- Ultimate: 100
Mana must be server-side.
Example:
Current mana = 60 Ability cost = 35 Result = 25
Current mana = 20 Ability cost = 35 Result = ability blocked.
Display:
"Not enough mana!"
---
- MANA REGENERATION
Implement configurable passive mana regeneration.
Default:
- amount: 5 mana
- interval: 2 seconds
Requirements:
- cannot exceed 200
- server-side
- configurable
- infinite-mana player ignores normal mana depletion/regeneration
---
- FIVE ELEMENTS AND POWERS
FIRE
Level 1 — Fireball
Mana: 20
- Ranged fire attack
- Fire projectile/trail
- Impact effect
- Fire sound
- Damages valid targets
- Does not damage its caster
Level 2 — Flame Burst
Mana: 35
- Short-range AoE attack
- Fire burst
- Area damage
- Burn/debuff where appropriate
- Caster immune to its own elemental damage
Level 3 — Fire Wall
Mana: 45
- Temporary fire zone/wall
- Damage enemies entering it
- Configurable duration
- Caster immune to its damage
Level 4 — Meteor
Mana: 70
- Large meteor/impact effect
- Area damage
- Strong particles
- Strong sound
- Caster immune to its own damage
Level 5 — Inferno
Mana: 100
Ultimate:
- Large Fire AoE
- Strong damage
- Burning effect
- High-quality visual effects
- Strong sound
- Cooldown
- Caster immune to own Inferno damage
---
WATER
Level 1 — Water Shot
Mana: 15
- Water projectile
- Moderate damage
- Blue particles
- Caster immune to own elemental damage
Level 2 — Aqua Wave
Mana: 30
- Forward water wave
- Knockback/control
- Water effects
- Caster immune to own elemental damage
Level 3 — Healing Water
Mana: 40
- Heals caster
- Healing animation/effect
- Cannot exceed maximum health
Level 4 — Water Prison
Mana: 65
- Target control/trap
- Temporary slow/prison
- Water sphere
- Duration configurable
Level 5 — Tsunami
Mana: 100
Ultimate:
- Large forward wave
- Area control
- Knockback
- Large wave animation
- Large water sound
- Cooldown
- Caster is not damaged by the ability
---
WIND / AIR
Level 1 — Wind Slash
Mana: 15
- Air blade
- Ranged/slash projectile
- Wind trail
- Caster immune to own elemental damage
Level 2 — Wind Dash
Mana: 25
- Short forward dash
- Wind trail
- Safe movement validation
- Prevent movement exploits
Level 3 — Tornado
Mana: 45
- Tornado zone
- Damage
- Controlled knockback
- Strong spinning particles
- Caster immune to its own damage
Level 4 — Air Blade
Mana: 65
- Strong ranged air blade
- Higher damage/range than Wind Slash
- Air trail
Level 5 — Tempest
Mana: 100
Ultimate:
- Large storm/tornado effect
- AoE damage
- Knockback
- Large wind animation
- Strong sound
- Cooldown
- Caster immune to own elemental damage
---
LIGHTNING
Level 1 — Spark
Mana: 15
- Small electric attack
- Electric particles
- Quick activation
- Caster immune to own elemental damage
Level 2 — Lightning Bolt
Mana: 30
- Targeted lightning strike
- Electric effect
- Lightning sound
- Caster immune to own elemental damage
Level 3 — Chain Shock
Mana: 45
- Hits primary target
- Can chain to nearby valid targets
- Configurable chain limit
- Prevent infinite loops
Level 4 — Thunder Strike
Mana: 70
- Heavy lightning strike
- Large impact area
- Strong particle/sound effect
- Caster immune to own elemental damage
Level 5 — Thunderstorm
Mana: 100
Ultimate:
- Controlled storm
- Multiple lightning strikes
- Large area effect
- Strong electric animation
- Thunder sound
- Cooldown
- Caster immune to own elemental damage
---
SHADOW
Level 1 — Dark Bolt
Mana: 20
- Dark projectile
- Damage + subtle debuff
- Caster immune to own elemental damage
Level 2 — Shadow Step
Mana: 30
- Short teleport/dash
- Safe location validation
- Dark teleport animation
Level 3 — Fear
Mana: 40
- Temporary debuff/control
- Dark particle effect
- Cooldown
Level 4 — Void Trap
Mana: 65
- Temporary trap field
- Slow/debuff
- Dark/void particles
- Caster immune to own elemental damage
Level 5 — Shadow Storm
Mana: 100
Ultimate:
- Large shadow energy field
- Area damage/debuff
- Strong dark vortex animation
- Strong sound
- Cooldown
- Caster immune to own elemental damage
---
- ELEMENTAL DAMAGE ENGINE
Create a dedicated elemental damage system.
Recommended logical structure:
"ElementalDamageManager"
It should contain:
- "applyElementalDamage()"
- "getAbilitySource()"
- "isSelfDamage()"
- "getElementType()"
- "validateTarget()"
- "applyDamage()"
- "applyDebuff()"
Every offensive ability should use this system rather than directly applying uncontrolled damage.
Pseudo-logic:
abilitySource = caster target = victim
if target == abilitySource: cancel elemental damage else: apply normal elemental damage
For delayed/AoE damage, retain the original caster/source identity so self-damage protection still works after the ability is created.
---
- LEVEL SYSTEM
Exactly 5 levels:
Level 1 Level 2 Level 3 Level 4 Level 5
Default:
"Level = 1"
XP progression must be configurable.
Do not allow use of locked abilities.
Example:
Fire Level 2:
✓ Fireball ✓ Flame Burst ✗ Fire Wall ✗ Meteor ✗ Inferno
---
- MOBILE ABILITY UI
Create a Bedrock/MCPE-friendly touch interface.
Show:
"🔥 FIRE"
"LEVEL 3"
"MANA: 125 / 200"
Ability controls:
"[Fireball]" "[Flame Burst]" "[Fire Wall]" "[Meteor]" "[Inferno]"
Only unlocked skills should be active.
The UI must be easy to use on Android touch screens.
---
- LIVE MANA OVERLAY
Create a real-time working Bedrock-compatible mana overlay.
Example:
"🔥 FIRE Lv.3"
"Mana: ███████████░░ 125/200"
The value must come from actual server-side mana.
Update when:
- ability is used
- mana regenerates
- player levels up
- player reconnects
- data is restored
- infinite mana state changes
Infinite player:
"👑 FIRE Lv.5"
"Mana: ∞ / ∞"
---
- ELEMENT MENU
Display:
Player Name
Element
Level
XP
Current Mana
Maximum Mana
Unlocked Skills
Locked Skills
Infinite Mana
Example:
ELEMENT 🔥 FIRE
LEVEL 3 / 5
MANA 125 / 200
ABILITIES ✓ Fireball ✓ Flame Burst ✓ Fire Wall 🔒 Meteor 🔒 Inferno
---
- FIRST JOIN EXPERIENCE
When a player joins for the first time:
- Detect first join.
- Randomly select one of the five elements.
- Save it immediately.
- Assign Level 1.
- Set max mana to 200.
- Play element assignment sound.
- Play custom particles.
- Show the selected element.
- Enable the mana overlay.
- If this is the server's first-ever player, grant infinite mana.
- Save all state permanently.
Example:
"AN ELEMENT HAS CHOSEN YOU"
"🌪️ WIND"
"LEVEL 1"
For the first-ever player:
"👑 FIRST CHOSEN"
"INFINITE MANA UNLOCKED"
---
- PERSISTENT DATA
Store:
- unique ID
- element
- level
- XP
- current mana
- maximum mana
- infinite mana
- first-join state
- cooldowns where appropriate
- statistics
Server-wide:
- first infinite-mana owner
Data must survive:
- reconnects
- death
- respawn
- world changes
- server restart
- crash recovery
---
- COOLDOWNS
Create a centralized cooldown manager.
Suggested defaults:
Level 1: 2–4 sec Level 2: 4–6 sec Level 3: 6–10 sec Level 4: 10–18 sec Level 5: 20–45 sec
Show:
"Ability on cooldown: 7s"
Cooldowns must be server-authoritative.
---
- COMMANDS
Implement:
"/element"
"/element info"
"/element set <player> <element>"
"/element level <player> <1-5>"
"/element xp <player> <amount>"
"/element mana <player> <amount>"
"/element infinite <player>"
"/element removeinfinite <player>"
"/element reset <player>"
"/element reload"
Use a proper permission system.
---
- ADMIN SAFETY FOR INFINITE MANA
There must always be exactly one automatic first-player owner.
If an administrator manually grants infinite mana to another player, clearly distinguish:
"automaticOwner"
and
"adminGranted"
Do not accidentally overwrite the original first-player record.
Prevent normal players from gaining infinite mana through commands/exploits.
---
- TEXTURES
Create a complete original Bedrock resource pack containing:
- elemental icons
- ability icons
- mana icon
- mana bar
- buttons
- locked/unlocked icons
- UI backgrounds
- elemental status indicators
- visual effect textures where required
All referenced files must exist.
Use Bedrock-compatible paths and formats.
---
- ANIMATIONS AND PARTICLES
Create polished original effects.
FIRE
- flame trail
- ember particles
- burst
- meteor impact
- inferno aura
WATER
- splash
- wave
- bubbles
- prison
- tsunami
WIND
- slash trail
- circular air particles
- tornado
- storm vortex
LIGHTNING
- sparks
- electric arcs
- lightning strike
- chain effect
- storm
SHADOW
- dark aura
- energy trail
- teleport trail
- void vortex
- shadow storm
Optimize effects for MCPE/mobile.
---
- SOUNDS
Create compatible original sound effects for every ability.
Fire:
- Fireball
- Flame Burst
- Fire Wall
- Meteor
- Inferno
Water:
- Water Shot
- Aqua Wave
- Healing Water
- Water Prison
- Tsunami
Wind:
- Wind Slash
- Wind Dash
- Tornado
- Air Blade
- Tempest
Lightning:
- Spark
- Lightning Bolt
- Chain Shock
- Thunder Strike
- Thunderstorm
Shadow:
- Dark Bolt
- Shadow Step
- Fear
- Void Trap
- Shadow Storm
Additional:
- element assignment
- mana regeneration
- level-up
- ability unlock
- insufficient mana
- cooldown
- infinite mana reward
Do not reference missing sound files.
---
- PERFORMANCE
Optimize for Minecraft Bedrock mobile players.
Avoid:
- huge particle counts
- thousands of entities
- unnecessary per-tick loops
- excessive network traffic
- uncontrolled AoE searches
- infinite chain calculations
- memory leaks
- permanent tasks that are not needed
Use:
- limited search radii
- scheduled updates
- configurable particle density
- cleanup systems
- efficient cooldown tracking
---
- SECURITY / EXPLOIT PREVENTION
Prevent:
- mana spoofing
- cooldown bypassing
- duplicated first-join rewards
- duplicated infinite mana
- ability spam
- invalid ability levels
- invalid elements
- teleport exploits
- movement exploits
- command abuse
- malformed player data
- crashes caused by bad state
All important gameplay logic must remain server-authoritative.
---
- CODE ARCHITECTURE
Use a modular structure such as:
MainPlugin PlayerDataManager ElementManager ManaManager AbilityManager ElementalDamageManager CooldownManager XPManager FirstJoinManager InfiniteManaManager CommandManager EventListener UIManager EffectManager SoundManager ConfigManager ResourcePackManager Utils
Each ability should be separately maintainable.
Do not put everything into one giant file.
---
- CONFIGURATION
Provide configuration for:
- max mana
- regeneration
- damage
- mana costs
- cooldowns
- ability range
- radius
- knockback
- duration
- XP requirements
- particle density
- sounds
- UI
- first-join system
- infinite-mana behavior
Example:
mana: max: 200 regeneration: enabled: true amount: 5 interval: 2
first_join: random_element: true
infinite_mana: first_player_only: true
---
- ERROR HANDLING
Gracefully handle:
- missing data
- corrupted data
- invalid configuration
- player disconnects
- world changes
- death during abilities
- invalid targets
- missing resources
- server restart
- interrupted abilities
Do not spam the console.
---
- TESTING REQUIREMENTS
Test the following:
First player
- random element assigned
- Level 1
- 200 max mana
- infinite mana granted
- infinite mana persisted
Second player
- random element assigned
- normal 200 mana
- no infinite mana
Persistence
- reconnect
- death
- respawn
- world change
- server restart
Combat
- Fire caster cannot hurt themselves with Fire
- Water caster cannot hurt themselves with Water
- Wind caster cannot hurt themselves with Wind
- Lightning caster cannot hurt themselves with Lightning
- Shadow caster cannot hurt themselves with Shadow
Same-element PvP
Test:
Wind player A → Wind ability → Wind player B
Result:
Wind player B takes damage.
Wind player B → Wind ability → Wind player A
Result:
Wind player A takes damage.
The same must work for Fire/Water/Lightning/Shadow.
Different-element PvP
Test all different-element combinations sufficiently to confirm normal damage works.
Mana
- Ability consumes correct mana
- Insufficient mana blocks skill
- Mana regenerates
- Mana never exceeds 200
- Infinite player never runs out
Level
- XP works
- level-up works
- locked abilities cannot be used
UI
- mana overlay updates
- element UI displays correctly
- infinite mana displays correctly
Resources
- textures load
- animations load
- particles load
- sounds load
Security
- cooldown bypass blocked
- duplicate infinite reward blocked
- invalid commands blocked
- invalid data handled safely
---
- FINAL DELIVERABLES
Generate the complete project containing:
- Full plugin source code
- Project structure
- Configuration
- Player data system
- Element system
- Mana system
- Infinite mana system
- Elemental damage/immunity system
- Ability implementations
- Level/XP system
- Cooldown system
- Commands
- Permissions
- Mobile UI
- Live mana overlay
- Resource pack
- Textures
- Particles
- Animations
- Sounds
- Manifest files
- Installation guide
- Build guide
- Compatibility information
- Testing checklist
- Troubleshooting guide
---
- FINAL QUALITY STANDARD
The result must feel like a polished Elemental Magic SMP, not a simple proof of concept.
The five elements must remain:
🔥 FIRE 💧 WATER 🌪️ WIND / AIR ⚡ LIGHTNING 🌑 SHADOW
Maximum normal mana:
"200"
Maximum level:
"5"
First-ever player:
"Infinite Mana"
Ability costs:
FIRE Fireball 20 Flame Burst 35 Fire Wall 45 Meteor 70 Inferno 100
WATER Water Shot 15 Aqua Wave 30 Healing Water 40 Water Prison 65 Tsunami 100
WIND / AIR Wind Slash 15 Wind Dash 25 Tornado 45 Air Blade 65 Tempest 100
LIGHTNING Spark 15 Lightning Bolt 30 Chain Shock 45 Thunder Strike 70 Thunderstorm 100
SHADOW Dark Bolt 20 Shadow Step 30 Fear 40 Void Trap 65 Shadow Storm 100
CRITICAL COMBAT RULE — MUST NOT BE MISINTERPRETED
The player's own elemental power must never damage its caster.
But two players with the same element can absolutely damage each other.
Example:
Player A = AIR Player B = AIR
A uses Wind Slash on B → B TAKES DAMAGE
A's Wind Slash hits A → A TAKES NO DAMAGE
Therefore, implement caster/source-based self-damage immunity, NOT global same-element immunity.
The final project must compile/build successfully for the selected Bedrock server platform and must contain no missing references, placeholder implementations, or intentionally incomplete systems.
Start building the complete project now.
Target PocketMine-MP 5.x with PHP 8.1+ and no third-party runtime dependencies.
Create modular persistence, elements, mana/XP/cooldowns, source-tracked elemental damage, abilities, commands, events, and mobile-friendly overlays.
Add production configuration, installation/build/testing documentation, and self-contained resource-pack definitions using vanilla-safe particle/audio fallbacks.
Created a modular PocketMine-MP 5.x ElementalSMP project targeting PHP 8.1+.
Included:
Five permanent elements with randomized first assignment
UUID-based persistent player and server data
Automatic first-player infinite mana ownership
Separate admin-granted infinite mana tracking
Server-authoritative mana, regeneration, XP, levels, and cooldowns
Source-tracked elemental damage with caster-only self-immunity
Same-element PvP remains enabled
Direct attacks, AoE, zones, traps, storms, chain attacks, and delayed damage
All 25 elemental abilities
Safe dash and teleport validation
/elementcommand system with admin controlsLive mana popup overlay and profile menu
Configurable costs, damage, cooldowns, ranges, durations, XP, and effects
Crash-safe JSON persistence
Native PocketMine particle and sound effects
Bedrock resource definitions, animations, UI metadata, language strings, and original SVG icon sheets
Installation, packaging, compatibility, troubleshooting, and QA documentation in
README.md
Compilation which option
Which compilation option do you mean—Gradle/Maven build configuration, Kotlin compiler settings, or a specific compiler error? Paste the relevant options or error message.
name: ElementalSMP
main: ElementalSMP\ElementalSMP
version: 1.0.0
api: 5.0.0
author: Kodari
description: Server-authoritative five-element SMP system for PocketMine-MP.
website: https://example.invalid/elementalsmp
commands:
element:
description: Open the elemental menu or manage elemental players.
usage: /element [info|cast|set|level|xp|mana|infinite|removeinfinite|reset|reload]
permission: element.use
permissions:
element.use:
description: Use elemental abilities and inspect elemental data.
default: true
element.admin:
description: Manage elemental data and configuration.
default: op