๐
1 file
16,612 chars
๐
pasted-code-1788703622362.txt
txt
1036 lines
โถ
pasted-code-1788703622362.txt
txt
1036 lines
Create a professional, production-ready Minecraft **Paper plugin** called **HiddenBlade**.
The plugin should simulate a highly detailed **Assassin-style Hidden Blade / Arm Bracer system**. The visual appearance, 3D models, textures, and animations will be created by me using a custom Resource Pack. Your job is to create the complete plugin-side logic and make the system work smoothly with my Resource Pack.
The final result should feel like a premium Assassin-style weapon system rather than a basic Minecraft item.
---
# CORE CONCEPT
The player receives a special Hidden Blade item that cannot normally be crafted, obtained, or generated.
The item represents a mechanical arm bracer with a hidden blade.
When the player activates it:
**Bracer โ Equip โ Mechanical activation โ Blade extends โ Blade becomes ready**
Right-clicking again should retract the blade.
The system must have proper states and transitions.
---
# 1. SPECIAL HIDDEN BLADE ITEM
Create a unique Hidden Blade item.
The item must be identifiable using:
* PersistentDataContainer
* A unique internal ID
* Custom item data
Do NOT identify it only by display name or lore.
Example internal ID:
`hiddenblade`
The item must NOT be obtainable through:
* Crafting
* Normal loot
* Villager trades
* Fishing
* Normal Creative inventory usage
* Any ordinary Minecraft method
Only the plugin can create it.
Admin command:
`/hiddenblade give `
Permission:
`hiddenblade.admin`
---
# 2. HIDDEN BLADE STATES
Create a proper state machine.
Required states:
`UNEQUIPPED`
`EQUIPPING`
`EQUIPPED`
`EXTENDING`
`EXTENDED`
`RETRACTING`
`COOLDOWN`
The plugin must never allow invalid state transitions.
For example:
UNEQUIPPED โ EQUIPPING โ EQUIPPED
EQUIPPED โ EXTENDING โ EXTENDED
EXTENDED โ RETRACTING โ EQUIPPED
---
# 3. EQUIP SYSTEM
When the player right-clicks the special Hidden Blade item:
Start the equip animation.
Sequence:
1. Mechanical equip sound
2. Bracer visual state
3. Small mechanical particles
4. Short animation delay
5. Enter EQUIPPED state
The timing must be configurable in `config.yml`.
---
# 4. PERSISTENT EQUIPPED STATE
Once equipped, the Hidden Blade should be considered attached to the player's arm.
If the player changes the item in their hand, the equipped state should remain active.
The plugin should track the player's Hidden Blade independently from the item currently held.
The system should NOT simply depend on:
`player.getInventory().getItemInMainHand()`
for the entire equipped state.
The player can manually unequip it through:
`/hiddenblade unequip`
or:
`/hiddenblade remove `
---
# 5. BLADE EXTENSION
When the Hidden Blade is equipped and the player right-clicks:
If the blade is retracted:
`EQUIPPED โ EXTENDING โ EXTENDED`
Play:
* Mechanical activation sound
* Blade movement sound
* Animation trigger
* Small particles
* Optional screen/visual effects
The animation duration should be configurable.
Example:
`extend-duration: 10`
---
# 6. BLADE RETRACTION
Right-click again while the blade is extended:
`EXTENDED โ RETRACTING โ EQUIPPED`
Play:
* Mechanical retract sound
* Blade movement sound
* Animation trigger
* Small particles
The animation should feel like a mechanical spring-loaded blade retracting into the bracer.
---
# 7. RESOURCE PACK INTEGRATION
I will create the Resource Pack myself.
The plugin must provide a clean integration system.
The Resource Pack will contain:
* Bracer model
* Blade model
* Textures
* Animation frames
* Equip animation
* Extend animation
* Retract animation
* Attack animation
* Special effects
* Custom sounds
The plugin should expose clear visual states such as:
`hiddenblade_equipped`
`hiddenblade_extending`
`hiddenblade_extended`
`hiddenblade_retracting`
`hiddenblade_retracted`
Document exactly how the Resource Pack should connect to these states.
Do not hard-code a specific third-party resource-pack plugin unless absolutely necessary.
---
# 8. ATTACK SYSTEM
The Hidden Blade should only perform its special attack when:
* The player owns/equips the Hidden Blade
* The blade is currently EXTENDED
* The player attacks another player
* The attack is not cancelled
* The attack cooldown is ready
Normal punches must not trigger the Hidden Blade system.
---
# 9. SPECIAL HIT EFFECT
When the Hidden Blade successfully hits another player:
Create a cinematic special hit effect.
Include configurable:
* Damage
* Knockback
* Particles
* Sounds
* Potion effects
* Attack animation
* Hit cooldown
Possible effects:
* Dark smoke
* Critical particles
* Flash effect
* Darkness
* Blindness for a very short duration
* Slowness
* Weakness
* Custom Resource Pack sound
All effects must be configurable.
---
# 10. STEALTH MODE
Add a special Stealth Mode.
Command:
`/hiddenblade stealth`
When enabled:
* Reduce unnecessary particles
* Reduce attack sound volume
* Use subtle activation effects
* Display Stealth status through ActionBar
* Make the weapon feel more discreet
Stealth should NOT automatically make the player completely invisible unless explicitly enabled in config.
Config:
`stealth.enabled`
`stealth.invisibility`
`stealth.sound-volume`
---
# 11. ASSASSINATION SYSTEM
Add an optional assassination system.
If the player is behind another player and within a configurable distance, the attack can trigger a special assassination effect.
Requirements:
* Hidden Blade must be EXTENDED
* Target must be within configurable range
* Attacker must be behind the target
* Cooldown must be ready
* Assassination must be enabled
Config example:
`assassination.enabled: true`
`assassination.range: 2.5`
`assassination.angle: 60`
The assassination effect should be cinematic and fast.
It should use:
* Special animation
* Unique sound
* Particles
* Custom damage
* Temporary effects
---
# 12. COMBO SYSTEM
Create a combo system.
Successful Hidden Blade attacks increase a combo counter.
Example:
Hit 1 โ Combo 1
Hit 2 โ Combo 2
Hit 3 โ Combo 3
The combo should reset after a configurable amount of time without hitting a target.
Example:
`combo.timeout: 3`
Different combo levels can trigger different effects.
---
# 13. FINISHER SYSTEM
Add a special Finisher system.
Example:
After reaching Combo 5:
Trigger:
* Special blade animation
* Unique sound
* Strong particle burst
* Special attack effect
* Temporary movement effect
* Custom Resource Pack animation
The Finisher must be configurable and can be disabled.
---
# 14. MECHANICAL ANIMATION FEEL
Make the system feel mechanical.
When extending:
1. Small mechanical click
2. Lock release
3. Short delay
4. Blade movement
5. Blade fully extended
6. Ready sound
When retracting:
1. Retract trigger
2. Mechanical click
3. Blade movement
4. Blade locks inside bracer
5. Final mechanical sound
The exact visual animation is handled by the Resource Pack.
---
# 15. COOLDOWN SYSTEM
Create separate cooldowns for:
* Equip
* Extend
* Retract
* Attack
* Assassination
* Finisher
All cooldowns must be configurable.
Example:
`cooldowns.attack: 8`
`cooldowns.extend: 10`
`cooldowns.retract: 10`
Use milliseconds or ticks consistently and document the system.
---
# 16. ACTION BAR
Display useful information through ActionBar.
Examples:
`โ Hidden Blade Ready`
`โ Blade Extended`
`โ Cooldown: 2.4s`
`โ Stealth Mode`
`โ Combo: 3`
The ActionBar messages must be configurable.
---
# 17. SOUND SYSTEM
Create a centralized sound manager.
Support configurable sounds:
`blade.equip`
`blade.extend`
`blade.retract`
`blade.hit`
`blade.assassination`
`blade.finisher`
`blade.stealth`
The sounds should support custom Resource Pack sound IDs.
Example:
`hiddenblade:blade_extend`
---
# 18. PARTICLE SYSTEM
Create a centralized particle manager.
Allow configuration of:
* Particle type
* Amount
* Offset X/Y/Z
* Speed
* Duration
* Location
* Spread
Avoid excessive particle spam.
---
# 19. DAMAGE SYSTEM
Damage must be configurable.
Example:
`damage.normal: 8.0`
`damage.assassination: 15.0`
`damage.finisher: 20.0`
The system should respect Minecraft/Paper damage events.
Do not bypass important protection systems.
Allow other plugins to cancel Hidden Blade attacks.
---
# 20. ADMIN COMMANDS
Implement:
`/hiddenblade give `
`/hiddenblade remove `
`/hiddenblade equip`
`/hiddenblade unequip`
`/hiddenblade extend`
`/hiddenblade retract`
`/hiddenblade stealth`
`/hiddenblade reload`
`/hiddenblade info`
`/hiddenblade upgrade `
Add tab completion.
---
# 21. PERMISSIONS
Create permissions:
`hiddenblade.admin`
`hiddenblade.give`
`hiddenblade.remove`
`hiddenblade.use`
`hiddenblade.equip`
`hiddenblade.attack`
`hiddenblade.assassination`
`hiddenblade.stealth`
`hiddenblade.upgrade`
`hiddenblade.reload`
---
# 22. INVENTORY PROTECTION
Prevent players from abusing the special item.
Handle:
* Drop
* Q key
* Inventory movement
* Offhand swap
* Item swapping
* Death
* Respawn
* World change
* Item pickup
* Item duplication
The special Hidden Blade should never accidentally duplicate.
---
# 23. DEATH BEHAVIOR
Create configurable death behavior.
Options:
`KEEP`
`DROP`
`REMOVE`
`RESET`
Example:
`death.behavior: KEEP`
After respawn, the system should correctly restore the player's Hidden Blade state if configured.
---
# 24. WORLD CHANGE
When changing worlds:
* Save current Hidden Blade state
* Prevent invalid animations
* Restore state correctly
* Cancel active animation tasks if necessary
---
# 25. PLAYER DISCONNECT
When a player leaves:
* Save their Hidden Blade state
* Cancel active tasks
* Prevent memory leaks
When they reconnect:
* Restore the correct state.
---
# 26. PERSISTENCE
Store player data persistently.
At minimum store:
* Equipped state
* Blade state
* Upgrade level
* Stealth state if desired
* Any future progression
Use a reliable storage system.
For a lightweight plugin, YAML/JSON is acceptable.
Design the storage layer so it can later be replaced with SQLite/MySQL.
---
# 27. UPGRADE SYSTEM
Create a scalable upgrade framework.
Example upgrades:
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
Do not hard-code the upgrade system so tightly that new upgrades become difficult to add.
---
# 28. CUSTOM EVENTS
Create Bukkit/Paper events:
`HiddenBladeEquipEvent`
`HiddenBladeUnequipEvent`
`HiddenBladeExtendEvent`
`HiddenBladeRetractEvent`
`HiddenBladeAttackEvent`
`HiddenBladeAssassinationEvent`
`HiddenBladeFinisherEvent`
Events should be cancellable where appropriate.
---
# 29. API
Create a public API/service that other plugins can use.
Methods such as:
`isEquipped(Player player)`
`isExtended(Player player)`
`equip(Player player)`
`unequip(Player player)`
`extend(Player player)`
`retract(Player player)`
`getUpgradeLevel(Player player)`
`setUpgradeLevel(Player player, int level)`
`isStealthMode(Player player)`
---
# 30. CONFIGURATION
Create a clean `config.yml`.
All important settings should be configurable.
Organize it into sections:
`item`
`damage`
`cooldowns`
`animation`
`sounds`
`particles`
`stealth`
`assassination`
`combo`
`finisher`
`upgrades`
`death`
`world-change`
`messages`
---
# 31. PERFORMANCE
The plugin must be optimized.
Do NOT use unnecessary repeating tasks for every player.
Only create tasks when:
* An animation is active
* A cooldown needs updating
* A temporary effect is running
Cancel tasks immediately when they are no longer needed.
Avoid:
* Packet spam
* Excessive particles
* Infinite loops
* Memory leaks
* Unnecessary event processing
---
# 32. COMPATIBILITY
Target modern **Paper Minecraft**.
Use Paper/Bukkit APIs where possible.
Avoid unnecessary dependencies.
If an external dependency is absolutely required for advanced model animation, clearly explain why and make the dependency optional if possible.
---
# 33. RESOURCE PACK DOCUMENTATION
Create a detailed README section specifically for me.
Explain exactly how to build my Resource Pack.
Document:
### Model states
`retracted`
`equipped`
`extending`
`extended`
`retracting`
### Animation IDs
For example:
`hiddenblade.equip`
`hiddenblade.extend`
`hiddenblade.retract`
`hiddenblade.attack`
`hiddenblade.assassination`
`hiddenblade.finisher`
### Sound IDs
Document every required sound.
### Model IDs
Document every required model.
I should be able to create the Resource Pack without having to inspect the Java source code.
---
# 34. VISUAL STATE API
Create a centralized method such as:
`setVisualState(Player player, HiddenBladeVisualState state)`
Possible values:
`RETRACTED`
`EQUIPPED`
`EXTENDING`
`EXTENDED`
`RETRACTING`
This system should be the single point responsible for communicating visual state changes to the Resource Pack.
---
# 35. ERROR HANDLING
The plugin must handle invalid situations safely.
Examples:
* Player logs out during animation
* Player dies during animation
* Player changes world during animation
* Player removes the item during activation
* Plugin reload occurs
* Target disconnects during attack
* Another plugin cancels the attack
Never leave the player stuck in:
`EXTENDING`
or:
`RETRACTING`
---
# 36. RELOAD
Implement:
`/hiddenblade reload`
Reload configuration safely.
Do not restart the entire plugin or create duplicate listeners/tasks.
---
# 37. CODE QUALITY
Use clean object-oriented architecture.
Suggested structure:
`HiddenBladePlugin`
`HiddenBladeManager`
`HiddenBladeState`
`HiddenBladePlayerData`
`HiddenBladeItem`
`AnimationManager`
`SoundManager`
`ParticleManager`
`CooldownManager`
`CombatManager`
`StealthManager`
`AssassinationManager`
`UpgradeManager`
`StorageManager`
`CommandManager`
`ListenerManager`
Do not put the entire plugin inside one giant Java class.
---
# 38. PROJECT STRUCTURE
Create a complete Maven or Gradle project.
Include:
`pom.xml` or `build.gradle`
`plugin.yml`
`config.yml`
Java source files
README
Proper package structure
The final project should compile into a working `.jar`.
---
# 39. IMPORTANT DESIGN REQUIREMENT
The Resource Pack is mine.
I will create:
* The 3D Bracer
* The Hidden Blade
* Textures
* Animation frames
* Visual effects
* Custom sounds
You create:
* Plugin logic
* Player states
* Animation triggers
* Combat
* Damage
* Cooldowns
* Commands
* Permissions
* Persistence
* API
* Events
* Configuration
* Resource Pack integration
Do NOT attempt to create the actual 3D model inside the plugin.
---
# 40. FINAL EXPERIENCE
The final gameplay experience should feel like this:
Player receives the Hidden Blade.
The player activates it.
**CLICK**
The mechanical bracer locks onto the arm.
**CLACK**
The mechanism activates.
The blade smoothly extends from the bracer.
**SHING**
The blade is ready.
The player attacks an enemy.
A cinematic hit effect occurs.
The blade can retract again with another mechanical animation.
Stealth Mode can be activated for silent gameplay.
Successful attacks can build combos.
Special conditions can trigger assassination animations.
High combos can trigger a cinematic finisher.
Everything should be configurable and Resource-Pack friendly.
The final result should feel like a polished **Assassin's Creed-inspired Hidden Blade system inside Minecraft**, while remaining optimized, modular, maintainable, and compatible with modern Paper servers.
KodariSep 6 at 2:11 pm 4
HiddenBladeSystem
A comprehensive Paper plugin implementing an Assassin-style Hidden Blade arm bracer system. Features a state machine managing equip, extend, retract animations with configurable timings. Includes attack system with special hit effects, stealth mode, assassination mechanics, combo counter, and finisher system. Provides persistent player data storage, upgrade framework, custom Bukkit events, public API, and centralized managers for sounds, particles, cooldowns, and animations. Integrates with custom resource packs through visual state API and configurable sound/particle IDs. Includes admin commands, permissions, inventory protection, and death/world-change handling.
Created the complete HiddenBlade Paper plugin project with:
Gradle build targeting Paper 1.21.4 and Java 21
Persistent hidden blade item using PDC identifiers
Equip, extend, retract, stealth, combo, assassination, and finisher systems
Configurable cooldowns, damage, effects, sounds, particles, upgrades, and death behavior
Player state persistence through YAML storage
Inventory, crafting, creative, drop, pickup, off-hand, and container protections
Custom cancellable Bukkit events
Public
HiddenBladeAPIAdmin commands with permissions and tab completion
Resource-pack integration documentation covering model states, custom model data, animation IDs, and sounds
plugin.yml,config.yml,README.md, Gradle files, and dependency manifest
Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
manifest.kod
README.md
settings.gradle
Code
31 1,724
src/main/java/com/kodari/hiddenblade/HiddenBladePlugin.java
package com.kodari.hiddenblade;
import org.bukkit.Bukkit;
import org.bukkit.NamespacedKey;
import org.bukkit.plugin.java.JavaPlugin;
public class HiddenBladePlugin extends JavaPlugin {
private NamespacedKey itemIdKey;
private NamespacedKey visualStateKey;
private StorageManager storage;
private CooldownManager cooldowns;
private AnimationManager animations;
private SoundManager sounds;
private ParticleManager particles;
private UpgradeManager upgrades;
private HiddenBladeManager manager;
private CombatManager combat;
private StealthManager stealth;
private HiddenBladeAPI api;
@Override
public void onEnable() {
saveDefaultConfig();
itemIdKey = new NamespacedKey(this, "item_id");
visualStateKey = new NamespacedKey(this, "visual_state");
storage = new StorageManager(this);
cooldowns = new CooldownManager();
animations = new AnimationManager(this);
sounds = new SoundManager(this);
particles = new ParticleManager(this);
upgrades = new UpgradeManager(this);
manager = new HiddenBladeManager(this, storage, cooldowns, animations, sounds, particles, upgrades);
combat = new CombatManager(this);
stealth = new StealthManager(this);
api = new HiddenBladeAPI(this);
Bukkit.getPluginManager().registerEvents(new HiddenBladeListener(this), this);
HiddenBladeCommand command = new HiddenBladeCommand(this);
if (getCommand("hiddenblade") != null) {
getCommand("hiddenblade").setExecutor(command);
getCommand("hiddenblade").setTabCompleter(command);
}
getLogger().info("HiddenBlade enabled.");
}
@Override
public void onDisable() {
if (manager != null) manager.shutdown();
getLogger().info("HiddenBlade disabled.");
}
public NamespacedKey itemIdKey() { return itemIdKey; }
public NamespacedKey visualStateKey() { return visualStateKey; }
public StorageManager getStorage() { return storage; }
public CooldownManager getCooldowns() { return cooldowns; }
public AnimationManager getAnimations() { return animations; }
public SoundManager getSounds() { return sounds; }
public ParticleManager getParticles() { return particles; }
public UpgradeManager getUpgrades() { return upgrades; }
public HiddenBladeManager getManager() { return manager; }
public CombatManager getCombat() { return combat; }
public StealthManager getStealth() { return stealth; }
public HiddenBladeAPI getApi() { return api; }
}