make this a 1.2.111 paper plugin that works on both java 21 and java 25
π
pasted-code-1791095675465.txt
txt
1163 lines
βΆ
# Advanced Minecraft PvP Bot Plugin
Create a highly advanced Minecraft PvP practice bot plugin.
The goal is to create a **realistic PvP practice opponent** that behaves like a skilled Minecraft player rather than a normal Minecraft mob.
The plugin should support three PvP gamemodes:
1. **Dia SMP**
2. **Sword**
3. **Axe**
The bot's kit, equipment, difficulty, movement, combat behavior, and advanced skills should be configurable.
---
# 1. CORE PLUGIN
Plugin name:
**PvPBot**
The plugin should be designed as a server-side Minecraft plugin.
Prioritize compatibility with the server version specified by the developer.
The bot should behave as close to a real Minecraft player as technically possible.
It should have:
* Player-like appearance
* Player-like movement
* Player-like combat
* Inventory
* Armor
* Offhand
* Hotbar
* Item switching
* Weapon switching
* Block interaction
* Item usage
* Knockback
* Sprinting
* Jumping
* Strafing
* Looking/aiming
* Configurable health
Do not make the bot behave like a normal zombie, skeleton, or other Minecraft mob.
---
# 2. COMMAND SYSTEM
Main command:
```text
/pvpbot
```
Opening the command should provide access to the bot management system.
Suggested subcommands:
```text
/pvpbot spawn
/pvpbot remove
/pvpbot menu
/pvpbot kit
/pvpbot difficulty
/pvpbot reload
/pvpbot list
```
The exact command structure can be adjusted if needed.
---
# 3. BOT MENU
Create a clean GUI for configuring the bot.
The menu should allow the player to:
* Select gamemode
* Select difficulty
* Configure kit
* Configure bot name
* Configure health
* Spawn bot
* Remove bot
* Reset bot
* Save kit
* Load kit
Gamemode selection:
```text
π Dia SMP
βοΈ Sword
πͺ Axe
```
---
# 4. FULLY CONFIGURABLE KIT SYSTEM
The bot's inventory must be completely configurable.
Do NOT hardcode the bot's equipment.
The player should be able to configure:
### Hotbar
All 9 hotbar slots.
### Inventory
All available inventory slots.
### Offhand
Configurable offhand item.
### Armor
* Helmet
* Chestplate
* Leggings
* Boots
### Item properties
Support:
* Item type
* Amount
* Enchantments
* Custom name
* Lore
* Durability
* Other normal Minecraft item properties
The bot must only use items that exist in its configured kit.
For example:
If there is no axe:
```text
No axe β cannot perform shield break.
```
If there is no crossbow:
```text
No crossbow β cannot perform Axe shield-break/crossbow combo.
```
If there are no cobwebs:
```text
No cobwebs β cannot perform Stun Web or Self-Web.
```
If there are no Golden Apples:
```text
No Golden Apples β cannot perform Golden Apple healing.
```
The AI should dynamically adapt to whatever kit the player creates.
---
# 5. BOT AI ARCHITECTURE
Use a modular AI system.
Recommended structure:
```text
PvPBot
β
βββ BotManager
βββ BotEntity
βββ TargetManager
βββ CombatAI
βββ MovementAI
βββ AimAI
βββ DecisionManager
βββ InventoryManager
βββ EquipmentManager
βββ SkillManager
βββ HealthManager
βββ DifficultyManager
β
βββ Gamemodes
β βββ DiaSMP
β βββ Sword
β βββ Axe
β
βββ Skills
βββ WTap
βββ Strafe
βββ ShieldBreak
βββ StunWeb
βββ SelfWeb
βββ CrossbowCombo
βββ BowQuickSwap
```
The AI should continuously evaluate the situation rather than follow one giant fixed script.
---
# 6. TARGETING
The bot should identify the player it is supposed to fight.
Target selection should consider:
* Distance
* Visibility
* Line of sight
* Alive/dead state
* Combat range
* Whether the target is currently valid
The bot should not attack random players unless configured to do so.
The bot should smoothly rotate toward the target.
Avoid unnatural instant 180-degree snapping whenever possible.
---
# 7. MOVEMENT AI
The bot should have advanced PvP movement.
It should be capable of:
* Sprinting
* Stopping sprint
* W-tapping
* Strafing left
* Strafing right
* Changing strafe direction
* Moving forward
* Moving backward
* Jumping
* Critical attacks
* Repositioning
* Chasing
* Retreating
* Maintaining combat distance
Movement should contain controlled randomness.
Do not make the bot perform exactly the same movement sequence every time.
---
# 8. W-TAPPING
Implement proper W-tap behavior.
After landing an appropriate melee hit:
1. Stop sprinting briefly.
2. Reset sprint state.
3. Resume forward movement.
4. Continue the attack sequence.
The bot should use W-tapping primarily for:
* Sword
* Axe
* Dia SMP
The bot should not simply hold forward and continuously attack.
W-tapping should have configurable timing based on difficulty.
---
# 9. SWORD GAMEMODE
Sword mode is specialized for sword PvP.
The bot should primarily fight with its sword.
### Core behavior
* W-tapping
* Sprint resetting
* Strafing
* Sprint attacks
* Critical attacks
* Jump timing
* Spacing
* Knockback control
* Repositioning
* Combo pressure
The bot should dynamically choose between:
```text
Forward
Backward
Left Strafe
Right Strafe
Stop
Jump
```
Do not make it constantly jump.
Do not make it permanently strafe in one direction.
The bot should adjust movement based on the target.
---
# 10. AXE GAMEMODE
Axe mode is specialized for advanced axe PvP.
The bot can use configured:
* Axe
* Sword
* Shield
* Bow
* Crossbow
* Other utility items
The most important part is the bot's ability to perform specific PvP combos.
---
# 11. AXE SKILL β SHIELD DISABLE β CHARGED CROSSBOW β MELEE
This must be implemented as a specific combo.
Do NOT replace it with generic ranged combat.
### Condition
The target is actively blocking with a shield.
### Sequence
```text
Target blocks
β
Switch to Axe
β
Attack shield
β
Shield disabled
β
Switch to Crossbow
β
Fire charged crossbow
β
Switch back to melee
β
Close distance
β
Melee attack
```
### Detailed behavior
1. Detect active shield blocking.
2. Switch to the axe.
3. Perform the axe attack.
4. Confirm that the shield has been successfully disabled.
5. Immediately switch to the crossbow.
6. Fire a charged crossbow shot.
7. Immediately switch back to the configured melee weapon.
8. Continue melee combat.
If the crossbow is already loaded, use it immediately.
If it is not loaded, the bot should only perform the combo if it can realistically prepare the crossbow without making the behavior nonsensical.
This should be treated as a high-priority Axe skill.
---
# 12. AXE SKILL β BOW QUICK SWAP / DOUBLE HIT
This is a separate Axe technique.
The bot should use the bow as a follow-up to melee knockback.
### Sequence
```text
Melee attack
β
Target gets knocked backward
β
Switch to Bow
β
Shoot target during knockback
β
Switch back to melee
β
Continue fighting
```
The bot should recognize the target's knockback state.
It should not randomly pull out the bow during ordinary melee.
The bow is being used specifically to create the quick-swap follow-up hit.
The bot should:
1. Land melee attack.
2. Detect successful knockback.
3. Quickly switch to bow.
4. Fire at the recovering target.
5. Quickly switch back to melee.
6. Continue pressure.
---
# 13. DIA SMP GAMEMODE
Dia SMP mode focuses on utility-heavy PvP.
Possible configured items:
* Sword
* Axe
* Shield
* Cobweb
* Golden Apple
* Water Bucket
* Bow
* Crossbow
* Blocks
* Other configured items
The main specialized abilities are:
1. Stun Web
2. Self-Web / Emergency Web
---
# 14. DIA SMP β STUN WEB
The bot should recognize when the target is actively blocking with a shield.
### Sequence
```text
Target blocks with shield
β
Switch to Axe
β
Disable shield
β
Switch to Cobweb
β
Place cobweb at target's feet
β
Target becomes trapped
β
Circle target
β
Melee / Critical attacks
```
### Important behavior
The bot should not simply stand directly in front of the target.
While the target is trapped, the bot should:
* Circle around the target
* Maintain useful attack distance
* Look toward the target
* Attack when appropriate
* Use critical attacks when appropriate
---
# 15. STUN WEB β TARGET ESCAPES
If the target leaves the cobweb:
```text
Target escapes
β
Stop web-combo behavior
β
Return to normal combat
β
W-tap
β
Strafe
β
Melee
```
If the target raises their shield again:
```text
Shield detected
β
Axe
β
Shield disabled
β
Cobweb
β
Circle
β
Melee / Crit
```
The bot should be able to repeat this technique whenever the conditions occur.
---
# 16. STUN WEB β WATER INTERACTION
The target can use water to remove the cobweb.
The bot should understand this.
Do NOT place cobwebs every tick.
Instead:
1. Detect that the target's cobweb was removed.
2. Detect whether water caused the removal.
3. Wait for the water to disappear/clear.
4. Check whether the target is still in a valid position.
5. If the target remains vulnerable and the bot has cobwebs, place another cobweb.
6. Continue the combo.
The bot should avoid wasting cobwebs unnecessarily.
---
# 17. DIA SMP β SELF-WEB / EMERGENCY WEB
This is a defensive skill.
The bot should only activate this when its health is:
**5 hearts or lower.**
Do not activate it at higher health by default.
### Sequence
```text
Bot reaches β€ 5 hearts
β
Emergency mode
β
Create self-web
β
Use Golden Apple
β
Continue healing
β
Protect itself inside web
β
Replace web if destroyed
β
Return to combat when safe
```
---
# 18. SELF-WEB PLACEMENT
The bot must use actual block-placement validation.
Do NOT simply make it:
```text
Look down
Place cobweb
```
That is unreliable in situations where the existing web interferes with placement.
Instead:
1. Detect current web position.
2. Search for valid nearby block faces.
3. Determine a valid placement position.
4. Rotate toward that placement position.
5. Place the cobweb.
6. Confirm that placement succeeded.
---
# 19. SELF-WEB REPLACEMENT
If the target destroys the cobweb underneath the bot:
```text
Detect web destroyed
β
Find valid placement
β
Aim toward valid block face
β
Place cobweb
β
Continue healing
```
The bot should be able to place the replacement by finding a valid placement face rather than relying on a fixed camera direction.
The AI must account for Minecraft's actual block-placement rules.
---
# 20. DIA SMP HEALING
When emergency mode activates:
* Use configured Golden Apples.
* Continue healing when appropriate.
* Monitor the enemy.
* Stay defensive while vulnerable.
* Replace destroyed web when possible.
Once the bot has recovered enough health, it can leave emergency mode.
The healing threshold should be configurable.
Default:
```text
Emergency: β€ 5 hearts
```
---
# 21. DECISION PRIORITY
The bot should have a priority-based decision system.
Example:
### Highest priority
* Bot critically low health
* Target actively blocking
* Target trapped in cobweb
* Defensive web destroyed
* Immediate attack opportunity
### Medium priority
* Target escaping
* Target healing
* Target repositioning
* Weapon switching
* Projectile opportunity
### Normal priority
* Melee
* W-tapping
* Strafing
* Jumping
* Repositioning
The bot should reevaluate its priorities continuously.
---
# 22. DIFFICULTY SYSTEM
Add:
## Easy
* Slow reactions
* More mistakes
* Less consistent W-tapping
* Less accurate movement
* Less frequent advanced skills
## Normal
* Good movement
* Regular W-tapping
* Reasonable reactions
* Basic advanced skill usage
## Hard
* Fast reactions
* Better movement
* Better item switching
* More consistent combos
* Better W-tapping
## Expert
* Very fast reactions
* Strong spacing
* Advanced item switching
* Accurate movement
* Advanced combo recognition
* Consistent W-tapping
* Better Dia SMP utility usage
* Better Axe combo execution
## Custom
Allow manual configuration of:
* Reaction time
* Attack delay
* W-tap frequency
* Strafe frequency
* Jump frequency
* Skill usage
* Utility usage
* Healing behavior
* Weapon switching
* Aggression
* Prediction accuracy
---
# 23. INTELLIGENT ITEM SWITCHING
The bot must be capable of quickly switching between hotbar items.
Examples:
### Axe combo
```text
Axe
β Crossbow
β Melee
```
### Bow quick swap
```text
Melee
β Bow
β Melee
```
### Stun Web
```text
Axe
β Cobweb
β Melee
```
### Emergency healing
```text
Cobweb
β Golden Apple
β Cobweb if necessary
```
The AI should know the actual hotbar slot of each item.
Do not assume a fixed slot.
---
# 24. COMBAT STATE MACHINE
Use a combat state system.
Example states:
```text
IDLE
TARGETING
APPROACHING
MELEE
W_TAPPING
STRAFING
SHIELD_BREAK
CROSSBOW_COMBO
BOW_QUICK_SWAP
STUN_WEB
WEB_COMBAT
EMERGENCY
HEALING
REPOSITIONING
RETREATING
```
The bot can transition between states based on current conditions.
Example:
```text
MELEE
β
Target blocks
β
SHIELD_BREAK
β
CROSSBOW_COMBO
β
MELEE
```
Another example:
```text
MELEE
β
Health β€ 5 hearts
β
EMERGENCY
β
SELF_WEB
β
HEALING
β
MELEE
```
---
# 25. REALISTIC BEHAVIOR
The bot should not be perfect.
It should have configurable imperfections:
* Slightly delayed reactions
* Occasional missed attacks
* Occasional poor positioning
* Occasional missed skill opportunity
* Variable strafe timing
* Variable W-tap timing
* Variable attack timing
Higher difficulty reduces these mistakes.
This makes the bot feel more like a real player.
---
# 26. BOT RESET
The bot should be able to reset after death or when requested.
Reset should restore:
* Health
* Armor
* Inventory
* Hotbar
* Offhand
* Position
* Combat state
* Target
* Active skills
* Cooldowns
Provide a command or GUI option to reset it.
---
# 27. MULTIPLE BOTS
The architecture should ideally support multiple bots, even if the first version only allows one.
Each bot should have its own:
* AI state
* Target
* Kit
* Difficulty
* Gamemode
* Health
* Cooldowns
* Combat state
Do not make the AI system globally dependent on one bot.
---
# 28. CONFIGURATION FILES
Use configuration files for persistent settings.
Example:
```text
config.yml
kits/
bots/
```
Allow settings such as:
```yaml
bot:
default-difficulty: NORMAL
default-health: 20
combat:
attack-range: 3.0
wtap-enabled: true
dia-smp:
emergency-health: 10
stun-web-enabled: true
self-web-enabled: true
axe:
shield-crossbow-combo: true
bow-quick-swap: true
```
The exact configuration format can be improved during development.
---
# 29. PERFORMANCE
The plugin must be optimized.
Do NOT run expensive AI calculations every server tick for every bot if they are unnecessary.
Separate:
* High-frequency movement/combat checks
* Lower-frequency decision making
* Target scanning
* Inventory checks
* Skill checks
Avoid unnecessary loops.
The plugin should work efficiently even when multiple bots are active.
---
# 30. IMPORTANT IMPLEMENTATION RULES
The developer/AI must prioritize **actual Minecraft mechanics**.
Do not fake combat behavior with particles or cosmetic animations.
When the bot attacks:
* Use actual Minecraft combat mechanics.
When the bot switches items:
* Actually change the held item.
When the bot places a cobweb:
* Actually place a Minecraft cobweb.
When the bot uses a shield:
* Actually use the shield.
When the bot fires a bow/crossbow:
* Actually use the weapon.
When the bot takes knockback:
* Use the server's actual knockback mechanics.
The goal is for the bot to be usable for genuine PvP practice.
---
# 31. KIT-DEPENDENT AI
The AI must dynamically determine available abilities.
Example:
```text
Kit contains:
Axe
Crossbow
Sword
Available:
Shield Break β Crossbow β Melee
```
But:
```text
Kit contains:
Axe
Sword
Available:
Shield Break
Melee
```
No crossbow combo should be attempted.
Likewise:
```text
Kit contains:
Sword
Bow
```
Bow Quick Swap is available.
If the bow is removed, that skill becomes unavailable.
---
# 32. FINAL GAMEMODE SUMMARY
## π DIA SMP
Primary focus:
* Stun Web
* Shield disable
* Axe β Cobweb
* Circle target
* Critical attacks
* Water/web interaction
* Self-Web
* Emergency healing
* Golden Apple usage
* W-tapping
* Strafing
## βοΈ SWORD
Primary focus:
* Sword combat
* W-tapping
* Sprint resetting
* Strafing
* Critical attacks
* Spacing
* Knockback control
* Combo pressure
* Repositioning
## πͺ AXE
Primary focus:
* Shield disable
* Axe β charged crossbow β melee
* Bow Quick Swap
* Melee knockback β bow β melee
* W-tapping
* Strafing
* Critical attacks
* Weapon switching
* Knockback control
---
# 33. CORE AI PHILOSOPHY
Do not build the bot as a collection of random scripted attacks.
Build it as a **situational PvP AI**.
Every advanced skill should follow:
```text
CONDITION
β
DECISION
β
ITEM SWITCH
β
ACTION
β
FOLLOW-UP
β
RE-EVALUATE
```
Example:
```text
Target is blocking
β
Switch to Axe
β
Disable Shield
β
Switch to Crossbow
β
Fire Charged Crossbow
β
Switch to Melee
β
Attack
β
Re-evaluate
```
Another:
```text
Bot β€ 5 hearts
β
Emergency Mode
β
Self-Web
β
Golden Apple
β
Monitor Web
β
Web destroyed?
β YES
Find valid placement
β
Replace Web
β
Continue healing
β
Return to combat
```
The finished plugin should feel like a **high-level Minecraft PvP practice player** that can understand the fight and choose appropriate techniques rather than blindly following a script.
The three initial gamemodes are:
**π Dia SMP | βοΈ Sword | πͺ Axe**
The system should be designed modularly so additional gamemodes and skills can be added later without rewriting the entire AI.
Create a Java 21 Paper 1.21.1 plugin project, versioned 1.2.111.
Add configurable kits, commands, a management menu, and per-bot difficulty/mode settings.
Implement a custom-controlled practice entity with owner-only targeting, movement, and melee combat.
Created PvPBot 1.2.111, targeting Paper 1.21.1 with Java 21 bytecode, which runs on Java 21 and Java 25. It includes /pvpbot commands, a management menu, configurable mode/difficulty, and kits in plugins/PvPBot/kits.yml.
Scope note: Paperβs public API does not spawn genuine player entities. This implementation uses a manually controlled, AI-disabled zombie entity, so it is not a real player NPC and does not implement the full requested skill set: shield-break combos, crossbow/bow swaps, web placement, or healing-item use.
Look at the dependencie yours doesnt work
Added the missing PaperMC Maven repository in build.gradle, so Gradle can resolve the declared Paper API dependency. If it still fails, send me the build error and Iβll fix the specific dependency issue.
i mean the plugin works everything works but the pvp bot doesnt work it just spawns the zombie and stands there doesnt follow the player it attacks the player yes it does
Fixed the botβs follow behavior in PracticeBot: it now uses zombie pathfinding while pursuing the player, then disables vanilla AI in attack range so the existing custom attack behavior remains in control.
I STILL WANT IT TO BE LIKE AN ACTUALLY A PLAYER NOT JUST HAVE ITS NORMAL ZOMBIE BEHAVIORS LIKE WHERE ARE THE THINGS I TOLD YOU LIKE I DONT WANT IT TO BE A ZOMBIE WITH ZOMBIE FUCKING BEHAVIOR AND IT DOESNT EVEN FOLLOW WHAT I TOLD YOU
π
pasted-code-1791096429907.txt
txt
1163 lines
βΆ
# Advanced Minecraft PvP Bot Plugin
Create a highly advanced Minecraft PvP practice bot plugin.
The goal is to create a **realistic PvP practice opponent** that behaves like a skilled Minecraft player rather than a normal Minecraft mob.
The plugin should support three PvP gamemodes:
1. **Dia SMP**
2. **Sword**
3. **Axe**
The bot's kit, equipment, difficulty, movement, combat behavior, and advanced skills should be configurable.
---
# 1. CORE PLUGIN
Plugin name:
**PvPBot**
The plugin should be designed as a server-side Minecraft plugin.
Prioritize compatibility with the server version specified by the developer.
The bot should behave as close to a real Minecraft player as technically possible.
It should have:
* Player-like appearance
* Player-like movement
* Player-like combat
* Inventory
* Armor
* Offhand
* Hotbar
* Item switching
* Weapon switching
* Block interaction
* Item usage
* Knockback
* Sprinting
* Jumping
* Strafing
* Looking/aiming
* Configurable health
Do not make the bot behave like a normal zombie, skeleton, or other Minecraft mob.
---
# 2. COMMAND SYSTEM
Main command:
```text
/pvpbot
```
Opening the command should provide access to the bot management system.
Suggested subcommands:
```text
/pvpbot spawn
/pvpbot remove
/pvpbot menu
/pvpbot kit
/pvpbot difficulty
/pvpbot reload
/pvpbot list
```
The exact command structure can be adjusted if needed.
---
# 3. BOT MENU
Create a clean GUI for configuring the bot.
The menu should allow the player to:
* Select gamemode
* Select difficulty
* Configure kit
* Configure bot name
* Configure health
* Spawn bot
* Remove bot
* Reset bot
* Save kit
* Load kit
Gamemode selection:
```text
π Dia SMP
βοΈ Sword
πͺ Axe
```
---
# 4. FULLY CONFIGURABLE KIT SYSTEM
The bot's inventory must be completely configurable.
Do NOT hardcode the bot's equipment.
The player should be able to configure:
### Hotbar
All 9 hotbar slots.
### Inventory
All available inventory slots.
### Offhand
Configurable offhand item.
### Armor
* Helmet
* Chestplate
* Leggings
* Boots
### Item properties
Support:
* Item type
* Amount
* Enchantments
* Custom name
* Lore
* Durability
* Other normal Minecraft item properties
The bot must only use items that exist in its configured kit.
For example:
If there is no axe:
```text
No axe β cannot perform shield break.
```
If there is no crossbow:
```text
No crossbow β cannot perform Axe shield-break/crossbow combo.
```
If there are no cobwebs:
```text
No cobwebs β cannot perform Stun Web or Self-Web.
```
If there are no Golden Apples:
```text
No Golden Apples β cannot perform Golden Apple healing.
```
The AI should dynamically adapt to whatever kit the player creates.
---
# 5. BOT AI ARCHITECTURE
Use a modular AI system.
Recommended structure:
```text
PvPBot
β
βββ BotManager
βββ BotEntity
βββ TargetManager
βββ CombatAI
βββ MovementAI
βββ AimAI
βββ DecisionManager
βββ InventoryManager
βββ EquipmentManager
βββ SkillManager
βββ HealthManager
βββ DifficultyManager
β
βββ Gamemodes
β βββ DiaSMP
β βββ Sword
β βββ Axe
β
βββ Skills
βββ WTap
βββ Strafe
βββ ShieldBreak
βββ StunWeb
βββ SelfWeb
βββ CrossbowCombo
βββ BowQuickSwap
```
The AI should continuously evaluate the situation rather than follow one giant fixed script.
---
# 6. TARGETING
The bot should identify the player it is supposed to fight.
Target selection should consider:
* Distance
* Visibility
* Line of sight
* Alive/dead state
* Combat range
* Whether the target is currently valid
The bot should not attack random players unless configured to do so.
The bot should smoothly rotate toward the target.
Avoid unnatural instant 180-degree snapping whenever possible.
---
# 7. MOVEMENT AI
The bot should have advanced PvP movement.
It should be capable of:
* Sprinting
* Stopping sprint
* W-tapping
* Strafing left
* Strafing right
* Changing strafe direction
* Moving forward
* Moving backward
* Jumping
* Critical attacks
* Repositioning
* Chasing
* Retreating
* Maintaining combat distance
Movement should contain controlled randomness.
Do not make the bot perform exactly the same movement sequence every time.
---
# 8. W-TAPPING
Implement proper W-tap behavior.
After landing an appropriate melee hit:
1. Stop sprinting briefly.
2. Reset sprint state.
3. Resume forward movement.
4. Continue the attack sequence.
The bot should use W-tapping primarily for:
* Sword
* Axe
* Dia SMP
The bot should not simply hold forward and continuously attack.
W-tapping should have configurable timing based on difficulty.
---
# 9. SWORD GAMEMODE
Sword mode is specialized for sword PvP.
The bot should primarily fight with its sword.
### Core behavior
* W-tapping
* Sprint resetting
* Strafing
* Sprint attacks
* Critical attacks
* Jump timing
* Spacing
* Knockback control
* Repositioning
* Combo pressure
The bot should dynamically choose between:
```text
Forward
Backward
Left Strafe
Right Strafe
Stop
Jump
```
Do not make it constantly jump.
Do not make it permanently strafe in one direction.
The bot should adjust movement based on the target.
---
# 10. AXE GAMEMODE
Axe mode is specialized for advanced axe PvP.
The bot can use configured:
* Axe
* Sword
* Shield
* Bow
* Crossbow
* Other utility items
The most important part is the bot's ability to perform specific PvP combos.
---
# 11. AXE SKILL β SHIELD DISABLE β CHARGED CROSSBOW β MELEE
This must be implemented as a specific combo.
Do NOT replace it with generic ranged combat.
### Condition
The target is actively blocking with a shield.
### Sequence
```text
Target blocks
β
Switch to Axe
β
Attack shield
β
Shield disabled
β
Switch to Crossbow
β
Fire charged crossbow
β
Switch back to melee
β
Close distance
β
Melee attack
```
### Detailed behavior
1. Detect active shield blocking.
2. Switch to the axe.
3. Perform the axe attack.
4. Confirm that the shield has been successfully disabled.
5. Immediately switch to the crossbow.
6. Fire a charged crossbow shot.
7. Immediately switch back to the configured melee weapon.
8. Continue melee combat.
If the crossbow is already loaded, use it immediately.
If it is not loaded, the bot should only perform the combo if it can realistically prepare the crossbow without making the behavior nonsensical.
This should be treated as a high-priority Axe skill.
---
# 12. AXE SKILL β BOW QUICK SWAP / DOUBLE HIT
This is a separate Axe technique.
The bot should use the bow as a follow-up to melee knockback.
### Sequence
```text
Melee attack
β
Target gets knocked backward
β
Switch to Bow
β
Shoot target during knockback
β
Switch back to melee
β
Continue fighting
```
The bot should recognize the target's knockback state.
It should not randomly pull out the bow during ordinary melee.
The bow is being used specifically to create the quick-swap follow-up hit.
The bot should:
1. Land melee attack.
2. Detect successful knockback.
3. Quickly switch to bow.
4. Fire at the recovering target.
5. Quickly switch back to melee.
6. Continue pressure.
---
# 13. DIA SMP GAMEMODE
Dia SMP mode focuses on utility-heavy PvP.
Possible configured items:
* Sword
* Axe
* Shield
* Cobweb
* Golden Apple
* Water Bucket
* Bow
* Crossbow
* Blocks
* Other configured items
The main specialized abilities are:
1. Stun Web
2. Self-Web / Emergency Web
---
# 14. DIA SMP β STUN WEB
The bot should recognize when the target is actively blocking with a shield.
### Sequence
```text
Target blocks with shield
β
Switch to Axe
β
Disable shield
β
Switch to Cobweb
β
Place cobweb at target's feet
β
Target becomes trapped
β
Circle target
β
Melee / Critical attacks
```
### Important behavior
The bot should not simply stand directly in front of the target.
While the target is trapped, the bot should:
* Circle around the target
* Maintain useful attack distance
* Look toward the target
* Attack when appropriate
* Use critical attacks when appropriate
---
# 15. STUN WEB β TARGET ESCAPES
If the target leaves the cobweb:
```text
Target escapes
β
Stop web-combo behavior
β
Return to normal combat
β
W-tap
β
Strafe
β
Melee
```
If the target raises their shield again:
```text
Shield detected
β
Axe
β
Shield disabled
β
Cobweb
β
Circle
β
Melee / Crit
```
The bot should be able to repeat this technique whenever the conditions occur.
---
# 16. STUN WEB β WATER INTERACTION
The target can use water to remove the cobweb.
The bot should understand this.
Do NOT place cobwebs every tick.
Instead:
1. Detect that the target's cobweb was removed.
2. Detect whether water caused the removal.
3. Wait for the water to disappear/clear.
4. Check whether the target is still in a valid position.
5. If the target remains vulnerable and the bot has cobwebs, place another cobweb.
6. Continue the combo.
The bot should avoid wasting cobwebs unnecessarily.
---
# 17. DIA SMP β SELF-WEB / EMERGENCY WEB
This is a defensive skill.
The bot should only activate this when its health is:
**5 hearts or lower.**
Do not activate it at higher health by default.
### Sequence
```text
Bot reaches β€ 5 hearts
β
Emergency mode
β
Create self-web
β
Use Golden Apple
β
Continue healing
β
Protect itself inside web
β
Replace web if destroyed
β
Return to combat when safe
```
---
# 18. SELF-WEB PLACEMENT
The bot must use actual block-placement validation.
Do NOT simply make it:
```text
Look down
Place cobweb
```
That is unreliable in situations where the existing web interferes with placement.
Instead:
1. Detect current web position.
2. Search for valid nearby block faces.
3. Determine a valid placement position.
4. Rotate toward that placement position.
5. Place the cobweb.
6. Confirm that placement succeeded.
---
# 19. SELF-WEB REPLACEMENT
If the target destroys the cobweb underneath the bot:
```text
Detect web destroyed
β
Find valid placement
β
Aim toward valid block face
β
Place cobweb
β
Continue healing
```
The bot should be able to place the replacement by finding a valid placement face rather than relying on a fixed camera direction.
The AI must account for Minecraft's actual block-placement rules.
---
# 20. DIA SMP HEALING
When emergency mode activates:
* Use configured Golden Apples.
* Continue healing when appropriate.
* Monitor the enemy.
* Stay defensive while vulnerable.
* Replace destroyed web when possible.
Once the bot has recovered enough health, it can leave emergency mode.
The healing threshold should be configurable.
Default:
```text
Emergency: β€ 5 hearts
```
---
# 21. DECISION PRIORITY
The bot should have a priority-based decision system.
Example:
### Highest priority
* Bot critically low health
* Target actively blocking
* Target trapped in cobweb
* Defensive web destroyed
* Immediate attack opportunity
### Medium priority
* Target escaping
* Target healing
* Target repositioning
* Weapon switching
* Projectile opportunity
### Normal priority
* Melee
* W-tapping
* Strafing
* Jumping
* Repositioning
The bot should reevaluate its priorities continuously.
---
# 22. DIFFICULTY SYSTEM
Add:
## Easy
* Slow reactions
* More mistakes
* Less consistent W-tapping
* Less accurate movement
* Less frequent advanced skills
## Normal
* Good movement
* Regular W-tapping
* Reasonable reactions
* Basic advanced skill usage
## Hard
* Fast reactions
* Better movement
* Better item switching
* More consistent combos
* Better W-tapping
## Expert
* Very fast reactions
* Strong spacing
* Advanced item switching
* Accurate movement
* Advanced combo recognition
* Consistent W-tapping
* Better Dia SMP utility usage
* Better Axe combo execution
## Custom
Allow manual configuration of:
* Reaction time
* Attack delay
* W-tap frequency
* Strafe frequency
* Jump frequency
* Skill usage
* Utility usage
* Healing behavior
* Weapon switching
* Aggression
* Prediction accuracy
---
# 23. INTELLIGENT ITEM SWITCHING
The bot must be capable of quickly switching between hotbar items.
Examples:
### Axe combo
```text
Axe
β Crossbow
β Melee
```
### Bow quick swap
```text
Melee
β Bow
β Melee
```
### Stun Web
```text
Axe
β Cobweb
β Melee
```
### Emergency healing
```text
Cobweb
β Golden Apple
β Cobweb if necessary
```
The AI should know the actual hotbar slot of each item.
Do not assume a fixed slot.
---
# 24. COMBAT STATE MACHINE
Use a combat state system.
Example states:
```text
IDLE
TARGETING
APPROACHING
MELEE
W_TAPPING
STRAFING
SHIELD_BREAK
CROSSBOW_COMBO
BOW_QUICK_SWAP
STUN_WEB
WEB_COMBAT
EMERGENCY
HEALING
REPOSITIONING
RETREATING
```
The bot can transition between states based on current conditions.
Example:
```text
MELEE
β
Target blocks
β
SHIELD_BREAK
β
CROSSBOW_COMBO
β
MELEE
```
Another example:
```text
MELEE
β
Health β€ 5 hearts
β
EMERGENCY
β
SELF_WEB
β
HEALING
β
MELEE
```
---
# 25. REALISTIC BEHAVIOR
The bot should not be perfect.
It should have configurable imperfections:
* Slightly delayed reactions
* Occasional missed attacks
* Occasional poor positioning
* Occasional missed skill opportunity
* Variable strafe timing
* Variable W-tap timing
* Variable attack timing
Higher difficulty reduces these mistakes.
This makes the bot feel more like a real player.
---
# 26. BOT RESET
The bot should be able to reset after death or when requested.
Reset should restore:
* Health
* Armor
* Inventory
* Hotbar
* Offhand
* Position
* Combat state
* Target
* Active skills
* Cooldowns
Provide a command or GUI option to reset it.
---
# 27. MULTIPLE BOTS
The architecture should ideally support multiple bots, even if the first version only allows one.
Each bot should have its own:
* AI state
* Target
* Kit
* Difficulty
* Gamemode
* Health
* Cooldowns
* Combat state
Do not make the AI system globally dependent on one bot.
---
# 28. CONFIGURATION FILES
Use configuration files for persistent settings.
Example:
```text
config.yml
kits/
bots/
```
Allow settings such as:
```yaml
bot:
default-difficulty: NORMAL
default-health: 20
combat:
attack-range: 3.0
wtap-enabled: true
dia-smp:
emergency-health: 10
stun-web-enabled: true
self-web-enabled: true
axe:
shield-crossbow-combo: true
bow-quick-swap: true
```
The exact configuration format can be improved during development.
---
# 29. PERFORMANCE
The plugin must be optimized.
Do NOT run expensive AI calculations every server tick for every bot if they are unnecessary.
Separate:
* High-frequency movement/combat checks
* Lower-frequency decision making
* Target scanning
* Inventory checks
* Skill checks
Avoid unnecessary loops.
The plugin should work efficiently even when multiple bots are active.
---
# 30. IMPORTANT IMPLEMENTATION RULES
The developer/AI must prioritize **actual Minecraft mechanics**.
Do not fake combat behavior with particles or cosmetic animations.
When the bot attacks:
* Use actual Minecraft combat mechanics.
When the bot switches items:
* Actually change the held item.
When the bot places a cobweb:
* Actually place a Minecraft cobweb.
When the bot uses a shield:
* Actually use the shield.
When the bot fires a bow/crossbow:
* Actually use the weapon.
When the bot takes knockback:
* Use the server's actual knockback mechanics.
The goal is for the bot to be usable for genuine PvP practice.
---
# 31. KIT-DEPENDENT AI
The AI must dynamically determine available abilities.
Example:
```text
Kit contains:
Axe
Crossbow
Sword
Available:
Shield Break β Crossbow β Melee
```
But:
```text
Kit contains:
Axe
Sword
Available:
Shield Break
Melee
```
No crossbow combo should be attempted.
Likewise:
```text
Kit contains:
Sword
Bow
```
Bow Quick Swap is available.
If the bow is removed, that skill becomes unavailable.
---
# 32. FINAL GAMEMODE SUMMARY
## π DIA SMP
Primary focus:
* Stun Web
* Shield disable
* Axe β Cobweb
* Circle target
* Critical attacks
* Water/web interaction
* Self-Web
* Emergency healing
* Golden Apple usage
* W-tapping
* Strafing
## βοΈ SWORD
Primary focus:
* Sword combat
* W-tapping
* Sprint resetting
* Strafing
* Critical attacks
* Spacing
* Knockback control
* Combo pressure
* Repositioning
## πͺ AXE
Primary focus:
* Shield disable
* Axe β charged crossbow β melee
* Bow Quick Swap
* Melee knockback β bow β melee
* W-tapping
* Strafing
* Critical attacks
* Weapon switching
* Knockback control
---
# 33. CORE AI PHILOSOPHY
Do not build the bot as a collection of random scripted attacks.
Build it as a **situational PvP AI**.
Every advanced skill should follow:
```text
CONDITION
β
DECISION
β
ITEM SWITCH
β
ACTION
β
FOLLOW-UP
β
RE-EVALUATE
```
Example:
```text
Target is blocking
β
Switch to Axe
β
Disable Shield
β
Switch to Crossbow
β
Fire Charged Crossbow
β
Switch to Melee
β
Attack
β
Re-evaluate
```
Another:
```text
Bot β€ 5 hearts
β
Emergency Mode
β
Self-Web
β
Golden Apple
β
Monitor Web
β
Web destroyed?
β YES
Find valid placement
β
Replace Web
β
Continue healing
β
Return to combat
```
The finished plugin should feel like a **high-level Minecraft PvP practice player** that can understand the fight and choose appropriate techniques rather than blindly following a script.
The three initial gamemodes are:
**π Dia SMP | βοΈ Sword | πͺ Axe**
The system should be designed modularly so additional gamemodes and skills can be added later without rewriting the entire AI.
Replace the Zombie with a skinned Citizens player NPC and put the configured kit in its real inventory.
Use Citizens navigation to follow the owner, with sprint reset during W-taps and no zombie AI.
Declare Citizens as a required API/runtime dependency.
Youβre right: the old code literally spawned a Zombie; changing its AI toggle didnβt make it the player-style opponent you described.
I replaced it with a Citizens Player NPC. It copies your skin, uses the configured player inventory and armor, and follows you using Citizens navigation instead of zombie movement. Citizens is now a required server dependency, so install Citizens alongside PvPBot.
This fixes the NPC type and following behavior, but the advanced combos and utility skills in your spec are not implemented yet.
bot doesnt spawn citizen is installed
Trace the bot spawn path and its Citizens integration.
Check the Citizens API guidance, then fix the spawn failure.
Citizens is already declared as a required dependency. The spawn code fails when npc.spawn(...) returns false; I added a player message and console warning for that case.
This makes the failure visible, but doesnβt identify why Citizens rejected the spawn. Share the server console output from a spawn attempt and your server version so I can target the underlying cause.
package com.kodari.pvpbot;
import com.kodari.pvpbot.bot.BotManager;
import com.kodari.pvpbot.command.BotCommand;
import com.kodari.pvpbot.gui.BotMenu;
import org.bukkit.Bukkit;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.File;
public final class PvPBotPlugin extends JavaPlugin {
private BotManager botManager;
private BotMenu botMenu;
@Override
public void onEnable() {
saveDefaultConfig();
if (!new File(getDataFolder(), "kits.yml").exists()) {
saveResource("kits.yml", false);
}
botManager = new BotManager(this);
botMenu = new BotMenu(this, botManager);
BotCommand botCommand = new BotCommand(this, botManager, botMenu);
PluginCommand command = getCommand("pvpbot");
if (command == null) {
throw new IllegalStateException("The pvpbot command is missing from plugin.yml");
}
command.setExecutor(botCommand);
command.setTabCompleter(botCommand);
Bukkit.getPluginManager().registerEvents(botMenu, this);
botManager.start();
}
@Override
public void onDisable() {
if (botManager != null) {
botManager.shutdown();
}
}
public void reloadPluginSettings() {
reloadConfig();
botManager.reloadKits();
}
}