๐
Complete HiddenBlade Plugin Development Prompt.md
md
1469 lines
โถ
Create and modify a professional, production-ready Minecraft **Paper plugin** called **HiddenBlade**.
The provided JAR/project is the existing base implementation. **Do NOT blindly rewrite it from scratch. First inspect and understand the existing code, classes, configuration, commands, events, item system, Spider system, Ghast Power system, player data system, and Hidden Blade logic. Then preserve working functionality and implement/fix the requested behavior.**
The final plugin should feel like a polished, premium **Assassin-style Hidden Blade / Arm Bracer system**, integrated with a custom Resource Pack.
I will create the Resource Pack, 3D models, textures, animations, and visual assets myself. The plugin must provide clean, reliable state management and visual-state integration for those assets.
---
# CORE CONCEPT
The plugin provides an Assassin-style Hidden Blade system.
The player can own a unique Hidden Blade / mechanical bracer.
The system contains:
- Hidden Blade
- Ghast Power
- Spider ability
- Combat system
- Stealth
- Assassination
- Combo system
- Finisher system
- Upgrade system
- Persistent player data
- Resource Pack visual states
- Commands
- Permissions
- Cooldowns
- Death/respawn handling
- Inventory protection
The final system must be modular, optimized, configurable, and safe for a production Paper server.
---
# 1. SPECIAL HIDDEN BLADE ITEM
Create a unique Hidden Blade item.
The item must be identifiable using reliable custom data.
Use:
- PersistentDataContainer
- Unique internal ID
- Custom item data
Example:
`hiddenblade`
Do NOT rely only on:
- Display name
- Lore
The Hidden Blade must not normally be:
- Crafted
- Generated
- Obtained from normal loot
- Obtained from villagers
- Obtained through fishing
- Obtained through normal Creative inventory methods
- Duplicated through inventory exploits
Only the plugin should create the special Hidden Blade.
Admin command:
`/hiddenblade give `
Permission:
`hiddenblade.admin`
---
# 2. HIDDEN BLADE STATES
Implement a proper state machine.
Required states:
`UNEQUIPPED`
`EQUIPPING`
`EQUIPPED`
`EXTENDING`
`EXTENDED`
`RETRACTING`
`COOLDOWN`
The plugin must prevent invalid transitions.
Example:
`UNEQUIPPED โ EQUIPPING โ EQUIPPED`
`EQUIPPED โ EXTENDING โ EXTENDED`
`EXTENDED โ RETRACTING โ EQUIPPED`
Do not allow multiple conflicting animation states at the same time.
---
# 3. EQUIP SYSTEM
When the player activates the Hidden Blade:
1. Start equip animation.
2. Play mechanical sound.
3. Trigger Resource Pack visual state.
4. Spawn subtle mechanical particles if enabled.
5. Wait for configurable animation duration.
6. Set state to `EQUIPPED`.
Configuration example:
```yaml
animation:
equip-duration: 10
```
The timing must be configurable.
---
# 4. BLADE EXTENSION
When Hidden Blade is equipped and the player activates it while the blade is retracted:
`EQUIPPED โ EXTENDING โ EXTENDED`
Play:
- Mechanical activation sound
- Lock-release sound
- Blade movement sound
- Resource Pack animation trigger
- Optional particles
- Ready sound
The animation should feel mechanical and spring-loaded.
---
# 5. BLADE RETRACTION
When the blade is extended and the player activates it again:
`EXTENDED โ RETRACTING โ EQUIPPED`
Play:
- Retraction sound
- Mechanical click
- Resource Pack retract animation
- Optional particles
- Final locking sound
The blade should visually and logically return to the equipped/retracted state.
---
# 6. PERSISTENT HIDDEN BLADE STATE
The Hidden Blade must NOT depend entirely on the item currently held in the player's main hand.
Once the player has the Hidden Blade equipped, the plugin should track the player's state independently.
Changing the currently held item must not accidentally destroy the player's Hidden Blade state.
The system must maintain player-specific state using UUID-based data.
---
# 7. OFFHAND / LEFT HAND REQUIREMENT
The Hidden Blade must **ALWAYS remain in the player's OFFHAND / LEFT HAND**.
This is a strict requirement.
The plugin must ensure:
- Hidden Blade is placed in OFFHAND.
- It must not automatically move to MAINHAND.
- It must not be swapped into MAINHAND by the plugin.
- It must not be lost during inventory handling.
- It must remain associated with the correct player.
- It must not be duplicated.
- Other normal inventory items must remain unaffected.
If the player attempts to move, swap, drop, or otherwise manipulate the special Hidden Blade, protect it appropriately.
---
# 8. DEATH AND RESPAWN BEHAVIOR
This behavior is extremely important.
When the player dies:
1. The Hidden Blade must NOT be dropped.
2. The Hidden Blade must NOT be removed.
3. The Hidden Blade must NOT be lost.
4. The Hidden Blade must NOT move to the MAINHAND.
5. The Hidden Blade must remain associated with that player.
6. Normal inventory items should follow normal Minecraft/Paper behavior.
7. After respawn, the Hidden Blade must be restored to the player's **OFFHAND / LEFT HAND**.
8. Do not create duplicate Hidden Blades.
9. Do not replace the player's normal main-hand item.
10. Do not accidentally duplicate or delete normal inventory items.
If there is existing death/respawn logic, fix and improve it instead of creating conflicting duplicate listeners.
The Hidden Blade must survive death while remaining logically associated with its original player.
---
# 9. RESOURCE PACK INTEGRATION
I will create the Resource Pack.
The Resource Pack will contain:
- Bracer model
- Hidden Blade model
- Blade textures
- Animation frames
- Equip animation
- Extend animation
- Retract animation
- Attack animation
- Assassination animation
- Finisher animation
- Custom sounds
- Visual effects
The plugin must expose clean visual states.
Required visual states:
`hiddenblade_retracted`
`hiddenblade_equipped`
`hiddenblade_extending`
`hiddenblade_extended`
`hiddenblade_retracting`
Create a centralized system such as:
`setVisualState(Player player, HiddenBladeVisualState state)`
The Resource Pack should be able to map these states to models/animations.
Do NOT hard-code a third-party Resource Pack plugin unless absolutely necessary.
---
# 10. ATTACK SYSTEM
The special Hidden Blade attack should only activate when:
- Player owns the Hidden Blade
- Hidden Blade is equipped
- Blade is extended
- Attack is valid
- Attack cooldown is ready
- The event has not been cancelled
Normal Minecraft punching must not accidentally trigger the special Hidden Blade attack.
Allow other plugins to cancel the attack.
---
# 11. COMBAT DAMAGE
Make damage configurable.
Example:
```yaml
damage:
normal: 8.0
assassination: 15.0
finisher: 20.0
```
Use proper Paper/Bukkit damage events.
Do not bypass important server protection systems.
Respect:
- PvP protection
- Event cancellation
- Invulnerability
- Other plugin restrictions
---
# 12. STEALTH MODE
Add:
`/hiddenblade stealth`
When enabled:
- Reduce unnecessary particles.
- Reduce attack sound volume.
- Use subtle activation effects.
- Show Stealth Mode through ActionBar.
- Make the Hidden Blade feel discreet.
Stealth should not automatically make the player invisible unless configured.
Example:
```yaml
stealth:
enabled: true
invisibility: false
sound-volume: 0.5
```
---
# 13. ASSASSINATION SYSTEM
Add an optional assassination system.
Config:
```yaml
assassination:
enabled: true
range: 2.5
angle: 60
```
Assassination requires:
- Hidden Blade equipped
- Blade extended
- Target within range
- Attacker behind target
- Correct viewing angle
- Cooldown ready
- Assassination enabled
Trigger:
- Special animation
- Unique sound
- Particles
- Special damage
- Temporary effects
- Resource Pack animation
The assassination should feel cinematic and fast.
---
# 14. COMBO SYSTEM
Create a combo system.
Successful Hidden Blade attacks increase the combo counter.
Example:
`Hit 1 โ Combo 1`
`Hit 2 โ Combo 2`
`Hit 3 โ Combo 3`
Reset the combo after configurable inactivity.
Example:
```yaml
combo:
enabled: true
timeout: 3
```
Combo state must be stored per player.
---
# 15. FINISHER SYSTEM
Add a configurable Finisher system.
Example:
After Combo 5:
- Special blade animation
- Unique sound
- Particle burst
- Strong attack
- Movement effect
- Resource Pack animation
Configuration:
```yaml
finisher:
enabled: true
required-combo: 5
```
---
# 16. SPIDER SYSTEM
The plugin also contains a Spider/Grappling-style ability connected to the player's Ghast Power.
The Spider system must be completely fixed and reliable.
---
# 17. `/spider` TOGGLE
The existing `/spider` command must become a real ON/OFF toggle.
Behavior:
`/spider`
โ Spider ON
Run again:
`/spider`
โ Spider OFF
Run again:
`/spider`
โ Spider ON
And so on.
The player must NOT have to type `/spider` before every Spider use.
When Spider is ON:
Every valid Right Click should be able to activate Spider.
Example:
`/spider`
โ ON
Right Click
โ Spider shoots
Right Click
โ Spider shoots again
Right Click
โ Spider shoots again
The Spider mode must remain ON after every successful use.
Do NOT remove the player from the Spider-enabled state after one shot.
---
# 18. SPIDER RIGHT-CLICK TARGETING
The current Spider system incorrectly requires the player to look directly at a block before it works.
Fix this.
The player should be able to:
**Look anywhere โ Right Click โ Spider activates toward that direction.**
Use a proper raycast starting from the player's eye position.
The raycast must use:
- Player eye location
- Player looking direction
- Maximum range
The maximum range must be:
**100 blocks**
If a block is hit within 100 blocks:
โ Use the hit location.
If no block is hit:
โ Spider must STILL activate toward the direction the player is looking.
Do NOT require a block to be directly under the crosshair.
Do NOT require the player to be standing on a block.
Do NOT require the player to click a block.
The ability must work in open air.
The intended behavior is:
**Player looks in any direction โ Right Click โ Spider shoots/pulls toward that direction โ maximum 100 blocks.**
---
# 19. SPIDER RANGE
The Spider maximum range must be:
**100 blocks**
If the existing configuration contains:
`spider.max-range: 64.0`
change it to:
`spider.max-range: 100.0`
Also search the entire implementation for hard-coded Spider range values.
There must be no hidden 64-block limit.
---
# 20. SPIDER WEB COUNT
The Spider web limit must be:
**100**
If the existing configuration contains:
`spider.max-webs: 64`
change it to:
`spider.max-webs: 100`
The player must be able to use up to 100 webs.
Example:
`100 โ 99 โ 98 โ ... โ 1 โ 0`
The system must stop when no webs remain.
Do not allow the counter to become negative.
Do not allow the player to exceed the configured maximum.
The ActionBar/UI should correctly display the current remaining amount.
---
# 21. SPIDER MUST NOT DISABLE AFTER ONE SHOT
This is a strict requirement.
Spider mode is a persistent toggle.
A Spider shot must consume a web, but it must NOT disable Spider mode.
Correct:
`Spider ON`
โ Right Click
โ Web consumed
โ Spider remains ON
โ Right Click again
โ Web consumed
โ Spider remains ON
Only `/spider` should disable Spider mode, or the ability should become unusable if the player no longer has the required power or has zero webs.
The temporary pull/animation state must be separate from the Spider-enabled state.
---
# 22. SPIDER PULL SYSTEM
Preserve the existing Spider pull mechanics.
If the current implementation contains a `Pull` object or pull map, do not delete it blindly.
The existing movement/pull behavior should continue working.
However:
**Spider enabled state โ active pull state.**
When a pull finishes:
- The pull ends.
- Spider mode remains ON.
- The player can immediately use Spider again when allowed.
Do not accidentally disable Spider when a pull completes.
---
# 23. SPIDER COOLDOWN
If the existing plugin has Spider cooldowns, preserve them.
Make them configurable.
A cooldown may prevent repeated activation for a very short period if necessary, but it must NOT require `/spider` again.
The cooldown and Spider toggle state must remain separate.
---
# 24. GHAST TEAR DROP BUG
There is a bug where having the special Ghast Tear prevents the player from dropping other items.
This must be fixed.
**ONLY the special plugin Ghast Tear must be protected from dropping.**
Examples:
| Item | Drop |
|---|---|
| Special Ghast Tear | โ No |
| Stone | โ
Yes |
| Dirt | โ
Yes |
| Cobblestone | โ
Yes |
| Diamond | โ
Yes |
| Sword | โ
Yes |
| Pickaxe | โ
Yes |
| Food | โ
Yes |
| Normal blocks | โ
Yes |
| Normal items | โ
Yes |
Having active Ghast Power must NOT disable normal item dropping.
---
# 25. PLAYERDROPITEMEVENT
Inspect the existing `PlayerDropItemEvent` implementation.
Do NOT do this:
```java
if (powerManager.hasActivePower(player)) {
event.setCancelled(true);
}
```
That behavior is too broad.
Instead:
1. Get the actual ItemStack being dropped.
2. Determine whether it is the special protected Ghast Tear.
3. If it is the special Ghast Tear:
- Cancel the drop.
4. Otherwise:
- Allow the event normally.
Do NOT globally cancel `PlayerDropItemEvent`.
---
# 26. SPECIAL GHAST TEAR IDENTIFICATION
Inspect how the existing plugin creates and identifies the special Ghast Tear.
Use reliable custom identification such as:
- PersistentDataContainer
- Custom internal ID
- Custom model data
- Existing item metadata
- Existing PowerItemManager logic
Do not identify every `Material.GHAST_TEAR` as the protected item unless that is explicitly how the existing plugin defines the special item.
The important requirement is:
**Only the plugin's special Ghast Tear is protected.**
---
# 27. GHAST POWER SYSTEM
Preserve the existing Ghast Power system.
The Spider ability should respect the existing active-power requirements.
If the player does not have the required active Ghast Power:
`/spider`
must not activate Spider.
Use the existing power-management architecture rather than creating a second incompatible power system.
---
# 28. INVENTORY PROTECTION
Protect special Hidden Blade and special power items against abuse.
Handle:
- Q drop
- Normal drop
- Inventory click
- Inventory drag
- Hotbar swapping
- Offhand swapping
- Item swapping
- Death
- Respawn
- Item pickup
- Item frame interaction
- Hopper movement if relevant
- Container movement if relevant
- Duplication exploits
However:
**Do NOT globally block normal item movement or dropping.**
Normal blocks and items must behave like normal Minecraft items.
Only special protected items should receive special restrictions.
---
# 29. SOUND SYSTEM
Create a centralized sound manager.
Support configurable sounds:
```yaml
sounds:
blade:
equip: hiddenblade:blade_equip
extend: hiddenblade:blade_extend
retract: hiddenblade:blade_retract
hit: hiddenblade:blade_hit
assassination: hiddenblade:blade_assassination
finisher: hiddenblade:blade_finisher
stealth: hiddenblade:blade_stealth
spider:
shoot: hiddenblade:spider_shoot
pull: hiddenblade:spider_pull
```
Support Resource Pack custom sound IDs.
---
# 30. PARTICLE SYSTEM
Create a centralized particle manager.
Support:
- Particle type
- Amount
- Offset
- Speed
- Duration
- Location
- Spread
Avoid excessive particle spam.
---
# 31. ACTION BAR
Display useful information.
Examples:
`โ Hidden Blade Ready`
`โ Blade Extended`
`โ Cooldown: 2.4s`
`โ Stealth Mode`
`โ Combo: 3`
`๐ท Spider: ON`
`๐ธ Webs: 87/100`
All messages should be configurable.
---
# 32. COOLDOWN SYSTEM
Create a centralized cooldown manager.
Support separate cooldowns for:
- Equip
- Extend
- Retract
- Attack
- Assassination
- Finisher
- Spider
Do not mix temporary animation states with cooldown state.
Use ticks or milliseconds consistently and document the choice.
---
# 33. ADMIN COMMANDS
Implement:
```text
/hiddenblade give
/hiddenblade remove
/hiddenblade equip
/hiddenblade unequip
/hiddenblade extend
/hiddenblade retract
/hiddenblade stealth
/hiddenblade reload
/hiddenblade info
/hiddenblade upgrade
/spider
```
Add tab completion.
The existing `/spider` command should be modified rather than duplicated.
---
# 34. PERMISSIONS
Create appropriate permissions:
```text
hiddenblade.admin
hiddenblade.give
hiddenblade.remove
hiddenblade.use
hiddenblade.equip
hiddenblade.attack
hiddenblade.assassination
hiddenblade.stealth
hiddenblade.upgrade
hiddenblade.reload
hiddenblade.spider
```
Respect the existing permission architecture if one already exists.
---
# 35. UPGRADE SYSTEM
Create a scalable upgrade system.
Example:
Level 1:
Basic Hidden Blade
Level 2:
Faster Extension
Level 3:
Reduced Attack Cooldown
Level 4:
Increased Damage
Level 5:
Improved Stealth
Level 6:
Advanced Finisher
The architecture must allow additional upgrades to be added later without rewriting the entire system.
---
# 36. PERSISTENT PLAYER DATA
Store player-specific data persistently.
At minimum:
- Hidden Blade ownership
- Hidden Blade equipped state
- Blade state
- Upgrade level
- Stealth state if desired
- Spider enabled state if appropriate
- Spider web count
- Other progression data
Use UUID-based storage.
YAML/JSON is acceptable for a lightweight plugin.
Design the storage layer so it can later be migrated to SQLite/MySQL.
---
# 37. DEATH / RESPAWN DATA
When a player dies:
- Save relevant Hidden Blade state.
- Preserve Hidden Blade ownership.
- Prevent the special item from dropping.
- Prevent it from disappearing.
- Prevent it from moving to main hand.
After respawn:
- Restore the Hidden Blade to OFFHAND.
- Restore the correct logical state.
- Do not duplicate it.
- Do not overwrite unrelated inventory slots.
---
# 38. WORLD CHANGE
When changing worlds:
- Save current state.
- Cancel unsafe animation tasks.
- Prevent invalid visual states.
- Restore state correctly.
- Keep player data intact.
---
# 39. PLAYER DISCONNECT
When a player disconnects:
- Save their data.
- Cancel active animation tasks.
- Cancel temporary pull tasks.
- Prevent memory leaks.
- Remove temporary runtime objects.
When they reconnect:
- Restore valid persistent state.
---
# 40. CUSTOM EVENTS
Create Bukkit/Paper events where appropriate:
`HiddenBladeEquipEvent`
`HiddenBladeUnequipEvent`
`HiddenBladeExtendEvent`
`HiddenBladeRetractEvent`
`HiddenBladeAttackEvent`
`HiddenBladeAssassinationEvent`
`HiddenBladeFinisherEvent`
`SpiderActivateEvent`
`SpiderPullEvent`
Events should be cancellable where appropriate.
---
# 41. PUBLIC API
Create a clean API for other plugins.
Methods such as:
```java
boolean isEquipped(Player player);
boolean isExtended(Player player);
void equip(Player player);
void unequip(Player player);
void extend(Player player);
void retract(Player player);
int getUpgradeLevel(Player player);
void setUpgradeLevel(Player player, int level);
boolean isStealthMode(Player player);
boolean isSpiderEnabled(Player player);
int getSpiderWebs(Player player);
void setSpiderWebs(Player player, int amount);
```
Keep the API modular and documented.
---
# 42. CONFIGURATION
Create a clean and organized `config.yml`.
Use sections such as:
```yaml
item:
damage:
cooldowns:
animation:
sounds:
particles:
stealth:
assassination:
combo:
finisher:
upgrades:
spider:
death:
world-change:
messages:
```
Spider configuration must include:
```yaml
spider:
max-range: 100.0
max-webs: 100
```
Do not leave old Spider values of 64 in the configuration or hard-coded logic.
---
# 43. ERROR HANDLING
Handle safely:
- Player logout during animation
- Player death during animation
- Player respawn
- World change during animation
- Plugin reload
- Target disconnect
- Target death
- Another plugin cancelling an attack
- Invalid item state
- Missing player data
- Missing configuration values
Never leave a player permanently stuck in:
`EQUIPPING`
`EXTENDING`
`RETRACTING`
`COOLDOWN`
If an animation is interrupted, safely reset the state.
---
# 44. RELOAD
Implement:
`/hiddenblade reload`
Reload configuration safely.
Do NOT:
- Register duplicate listeners
- Create duplicate tasks
- Duplicate commands
- Leak old managers
- Break player states
---
# 45. PERFORMANCE
Optimize the plugin for a real multiplayer Paper server.
Avoid unnecessary repeating tasks for every player.
Only create tasks when needed for:
- Animation
- Temporary effects
- Cooldowns
- Pull movement
Cancel tasks immediately when finished.
Avoid:
- Packet spam
- Excessive particles
- Infinite loops
- Memory leaks
- Unnecessary event processing
- Per-tick processing for players who are not using an ability
---
# 46. CODE ARCHITECTURE
Use clean object-oriented architecture.
Suggested structure:
```text
HiddenBladePlugin
HiddenBladeManager
HiddenBladeState
HiddenBladePlayerData
HiddenBladeItem
VisualStateManager
AnimationManager
SoundManager
ParticleManager
CooldownManager
CombatManager
StealthManager
AssassinationManager
ComboManager
FinisherManager
SpiderManager
PowerManager
PowerItemManager
UpgradeManager
StorageManager
PlayerDataManager
CommandManager
ListenerManager
```
Do not put the entire plugin into one giant Java class.
Reuse existing classes if they already provide these responsibilities.
Do not create duplicate managers that conflict with existing functionality.
---
# 47. PLUGIN.YML
Make sure `plugin.yml` correctly contains:
- Plugin name
- Version
- Main class
- API version
- Commands
- Permissions
Make sure `/spider` is registered exactly once.
---
# 48. RESOURCE PACK DOCUMENTATION
Create a detailed README explaining how I should connect my Resource Pack.
Document:
### Visual states
`hiddenblade_retracted`
`hiddenblade_equipped`
`hiddenblade_extending`
`hiddenblade_extended`
`hiddenblade_retracting`
### Animations
`hiddenblade.equip`
`hiddenblade.extend`
`hiddenblade.retract`
`hiddenblade.attack`
`hiddenblade.assassination`
`hiddenblade.finisher`
### Spider animations
`hiddenblade.spider`
`hiddenblade.spider_shoot`
`hiddenblade.spider_pull`
### Sounds
Document every sound ID.
### Models
Document every model/custom item state.
I should be able to build the Resource Pack without needing to inspect the Java source code.
---
# 49. RESOURCE PACK VISUAL STATE API
Create one centralized system responsible for changing the visual state.
Example:
```java
setVisualState(player, HiddenBladeVisualState.RETRACTED);
setVisualState(player, HiddenBladeVisualState.EQUIPPED);
setVisualState(player, HiddenBladeVisualState.EXTENDING);
setVisualState(player, HiddenBladeVisualState.EXTENDED);
setVisualState(player, HiddenBladeVisualState.RETRACTING);
```
The rest of the plugin should use this system instead of directly manipulating Resource Pack state in multiple locations.
---
# 50. SECURITY / DUPLICATION PROTECTION
The plugin must prevent duplication of:
- Hidden Blade
- Special Ghast Tear
- Special Spider resources
- Upgrade data
Check dangerous interactions including:
- Death
- Respawn
- Inventory click
- Offhand swap
- Container interaction
- Item pickup
- Item drop
- World change
- Disconnect/reconnect
- Plugin reload
Normal Minecraft items must remain unaffected.
---
# 51. FINAL TEST REQUIREMENTS
Before considering the plugin complete, test ALL of the following.
## Hidden Blade
- [ ] Special Hidden Blade can be created by plugin.
- [ ] Hidden Blade cannot be normally crafted.
- [ ] Hidden Blade cannot be normally duplicated.
- [ ] Hidden Blade is identifiable by PDC/custom ID.
- [ ] Hidden Blade remains associated with the player.
- [ ] Hidden Blade remains in OFFHAND.
- [ ] Hidden Blade does not move to MAINHAND.
- [ ] Hidden Blade cannot accidentally be dropped.
- [ ] Hidden Blade survives death.
- [ ] Hidden Blade is restored after respawn.
- [ ] No duplicate Hidden Blade is created.
## Blade
- [ ] Equip works.
- [ ] Extend works.
- [ ] Retract works.
- [ ] States transition correctly.
- [ ] Animations cannot overlap.
- [ ] Cooldowns work.
- [ ] Resource Pack states are triggered correctly.
## Combat
- [ ] Normal attacks do not incorrectly trigger the system.
- [ ] Extended blade can attack.
- [ ] Damage is configurable.
- [ ] Other plugins can cancel attacks.
- [ ] Assassination works.
- [ ] Combo works.
- [ ] Finisher works.
- [ ] Stealth works.
## Spider
- [ ] `/spider` exists.
- [ ] `/spider` toggles ON.
- [ ] `/spider` toggles OFF.
- [ ] Spider stays ON after shooting.
- [ ] No need to type `/spider` again after each shot.
- [ ] Right Click repeatedly activates Spider.
- [ ] Spider works while looking into open air.
- [ ] Spider does not require a block to be directly targeted.
- [ ] Spider uses the player's looking direction.
- [ ] Maximum range is 100 blocks.
- [ ] Maximum webs is 100.
- [ ] Web counter is correct.
- [ ] One web is consumed per successful use.
- [ ] Counter never becomes negative.
- [ ] Spider stops when no webs remain.
- [ ] Existing pull mechanics still work.
- [ ] Pull completion does NOT disable Spider mode.
- [ ] One physical click does not trigger Spider twice.
## Ghast Tear
- [ ] Special Ghast Tear cannot be dropped.
- [ ] Stone can be dropped.
- [ ] Dirt can be dropped.
- [ ] Cobblestone can be dropped.
- [ ] Diamond can be dropped.
- [ ] Tools can be dropped.
- [ ] Food can be dropped.
- [ ] Normal items can be dropped.
- [ ] Active Ghast Power does NOT globally block item drops.
- [ ] Only the intended special Ghast Tear is protected.
## Data
- [ ] Player data saves correctly.
- [ ] Player data loads correctly.
- [ ] Death does not corrupt data.
- [ ] Respawn does not duplicate items.
- [ ] Disconnect does not lose state.
- [ ] World changes do not corrupt state.
- [ ] Reload does not create duplicate tasks/listeners.
---
# 52. BUILD REQUIREMENTS
After implementation:
1. Compile the complete project.
2. Fix ALL compilation errors.
3. Fix ALL runtime errors.
4. Verify `plugin.yml`.
5. Verify `config.yml`.
6. Verify all commands.
7. Verify all permissions.
8. Verify all event listeners.
9. Verify no duplicate listeners.
10. Verify no duplicate commands.
11. Verify Spider range = 100.
12. Verify Spider webs = 100.
13. Verify Spider remains enabled after each shot.
14. Verify Spider works without requiring a block.
15. Verify only the special Ghast Tear is protected from dropping.
16. Verify Hidden Blade remains in OFFHAND after death/respawn.
17. Verify normal items remain fully functional.
18. Build the final production-ready JAR.
---
# 53. CRITICAL INSTRUCTION
**Do not implement only part of this specification.**
Every requirement above must work simultaneously.
Do not fix Spider by breaking Ghast Power.
Do not fix Ghast Tear dropping by blocking all item drops.
Do not fix Hidden Blade death behavior by moving it to the main hand.
Do not make Spider toggle work by removing the existing pull system.
Do not replace the existing plugin architecture unnecessarily.
Do not leave old hard-coded values such as 64 for Spider range or web count.
Do not create duplicate commands or listeners.
Do not guess how existing systems work.
**Inspect the actual existing implementation first, then make precise modifications.**
The final result must be a stable, production-ready Paper plugin that combines:
**Hidden Blade + Ghast Power + Spider + Combat + Stealth + Assassination + Combo + Finisher + Upgrades + Resource Pack integration**
without breaking existing functionality.
The final gameplay should feel like a polished, premium **Assassin-style Hidden Blade system inside Minecraft**, not a collection of unrelated basic commands.
Create the Gradle project, plugin metadata, configuration, and Resource Pack integration guide.
Implement persistent player data, protected special items, cooldowns, visual/audio/particle services, and blade state transitions.
Implement combat, stealth, combo/finisher, Ghast Power validation, and persistent Spider targeting/pull behavior.
Add commands, permissions, custom events, listeners, death/respawn protection, and the public plugin API.
Created the complete Paper Gradle project with
plugin.yml,config.yml, permissions, commands, and Resource Pack integration documentation.Implemented persistent UUID-based player data, PDC-identified Hidden Blade and Ghast Power items, offhand enforcement, drop/container/death/respawn protection, and duplicate prevention.
Added Hidden Blade state transitions, configurable animation timing, visual states, sounds, particles, cooldowns, stealth, combat, assassination, combo, finisher, upgrades, and custom cancellable events.
Added persistent Spider toggle behavior with Ghast Power validation, 100-block directional raycasting, open-air targeting, 100-web limit, cooldowns, and pull mechanics.
Added
/hiddenbladeadministration commands,/spider, tab completion, public API methods, shutdown cleanup, world-change handling, and disconnect persistence.
package com.kodari.hiddenblade;
import lombok.Getter;
import org.bukkit.NamespacedKey;
import org.bukkit.command.PluginCommand;
import org.bukkit.plugin.java.JavaPlugin;
@Getter
public final class HiddenBladePlugin extends JavaPlugin {
private PlayerDataManager dataManager;
private ItemManager items;
private VisualStateManager visuals;
private SoundManager sounds;
private ParticleManager particles;
private CooldownManager cooldowns;
private UpgradeManager upgrades;
private PowerManager powerManager;
private HiddenBladeManager blades;
private ComboManager combos;
private CombatManager combat;
private StealthManager stealth;
private SpiderManager spider;
private NamespacedKey bladeKey;
private NamespacedKey powerKey;
private NamespacedKey visualKey;
@Override
public void onEnable() {
saveDefaultConfig();
bladeKey = new NamespacedKey(this, "item_id");
powerKey = new NamespacedKey(this, "power_id");
visualKey = new NamespacedKey(this, "visual_state");
dataManager = new PlayerDataManager(this);
dataManager.load();
items = new ItemManager(this);
visuals = new VisualStateManager(this, items);
sounds = new SoundManager(this);
particles = new ParticleManager(this);
cooldowns = new CooldownManager();
upgrades = new UpgradeManager(this);
powerManager = new PowerManager(this);
blades = new HiddenBladeManager(this);
combos = new ComboManager(this);
combat = new CombatManager(this);
stealth = new StealthManager(this);
spider = new SpiderManager(this);
getServer().getPluginManager().registerEvents(new HiddenBladeListener(this), this);
HiddenBladeCommand command = new HiddenBladeCommand(this);
PluginCommand hiddenblade = getCommand("hiddenblade");
if (hiddenblade != null) { hiddenblade.setExecutor(command); hiddenblade.setTabCompleter(command); }
PluginCommand spiderCommand = getCommand("spider");
if (spiderCommand != null) spiderCommand.setExecutor(new SpiderCommand(this));
}
@Override
public void onDisable() {
for (org.bukkit.entity.Player player : getServer().getOnlinePlayers()) {
blades.cancel(player);
spider.cancel(player);
}
dataManager.saveAll();
}
public boolean isEquipped(org.bukkit.entity.Player player) {
return dataManager.get(player.getUniqueId()).isEquipped();
}
public boolean isExtended(org.bukkit.entity.Player player) {
return dataManager.get(player.getUniqueId()).getState() == HiddenBladeState.EXTENDED;
}
public void equip(org.bukkit.entity.Player player) { blades.equip(player); }
public void unequip(org.bukkit.entity.Player player) { blades.unequip(player); }
public void extend(org.bukkit.entity.Player player) { blades.extend(player); }
public void retract(org.bukkit.entity.Player player) { blades.retract(player); }
public int getUpgradeLevel(org.bukkit.entity.Player player) { return upgrades.getLevel(player); }
public void setUpgradeLevel(org.bukkit.entity.Player player, int level) { upgrades.setLevel(player, level); }
public boolean isStealthMode(org.bukkit.entity.Player player) { return dataManager.get(player.getUniqueId()).isStealth(); }
public boolean isSpiderEnabled(org.bukkit.entity.Player player) { return dataManager.get(player.getUniqueId()).isSpiderEnabled(); }
public int getSpiderWebs(org.bukkit.entity.Player player) { return dataManager.get(player.getUniqueId()).getSpiderWebs(); }
public void setSpiderWebs(org.bukkit.entity.Player player, int amount) {
dataManager.get(player.getUniqueId()).setSpiderWebs(Math.max(0, Math.min(amount, dataManager.maxWebs())));
dataManager.save(dataManager.get(player.getUniqueId()));
}
}