📄
pasted-code-1794596235573.txt
txt
529 lines
▶
21SMP – Complete Custom Sword Plugin
Full Development Specification
Develop a complete, production-ready Minecraft plugin for Paper 26.2
The plugin is for my Minecraft server called 21SMP.
I want a professional, lightweight and fully functional plugin. Do not provide pseudocode, placeholders or incomplete implementations.
Write all source files, compile the project, test it and deliver the complete project as a ZIP.
If a client-side Fabric mod is required for certain features, develop and include that as well.
⸻
1. CUSTOM 21SMP SWORD
Create a unique custom sword for 21SMP.
Requirements:
* Custom name: 21SMP Sword.
* Unique custom lore.
* Light-blue/cyan visual theme.
* Custom particles and sounds when using abilities.
* Make it visually distinguishable from normal Minecraft swords.
* Use PersistentDataContainer to identify the sword.
* Prevent normal swords from activating abilities.
* The sword must ONLY be obtainable through its custom crafting recipe.
* Never automatically give players the sword.
* Abilities must be saved directly on the sword.
* The sword must keep its ability when dropped, transferred or stored.
Keep the design clean and professional, not overloaded with effects.
⸻
2. CUSTOM CRAFTING RECIPE
The 21SMP Sword must have a completely customizable crafting recipe.
ALL recipe settings must be editable inside config.yml.
Requirements:
* Change the recipe without editing Java code.
* Support shaped and shapeless recipes.
* Configure all 9 crafting table slots individually.
* Configure the recipe shape.
* Configure materials and ingredient amounts.
* Support custom ingredients where possible.
* Enable or disable the recipe.
* Reload the recipe using /21sword reload.
* No server restart should be required after changing the recipe.
* Validate the configuration and show clear console errors if the recipe is invalid.
Example config.yml:
sword-recipe:
enabled: true
type: SHAPED
shape:
- "ADA"
- "SES"
- "ADA"
ingredients:
A:
material: AMETHYST_SHARD
D:
material: DIAMOND
S:
material: SCULK
E:
material: ECHO_SHARD
The example recipe must work, but I must be able to replace it completely.
⸻
3. LOGIN AND REGISTRATION SYSTEM
Create an authentication system for offline-mode players.
IMPORTANT: This is a separate plugin authentication system. It does not provide the same security as Minecraft online-mode authentication.
First Join – Registration
When a player joins for the first time:
* Start a 10-second registration timer.
* Display a clear registration screen.
* Show instructions explaining how to register.
* Players must register using:
/register
* Both passwords must match.
* If registration is not completed within 10 seconds, kick the player.
* Prevent movement, interaction, inventory access, chat and normal commands before authentication.
* Only authentication commands should work.
Every Subsequent Join – Login
Every time a registered player joins:
* Require them to log in again.
* Use:
/login
* Start a 10-second login timer.
* Kick players who do not authenticate in time.
* Block all normal gameplay until successful login.
Security
* Use Argon2id or BCrypt with unique salts.
* Never store plaintext passwords.
* Use SQLite for persistent account storage.
* Identify accounts using UUIDs.
* Avoid exposing passwords in chat logs.
* Validate password length and input.
* Prevent login and registration bypasses.
* Make timeout configurable in config.yml.
⸻
4. ABILITY SELECTION SYSTEM
After successful registration or login, show an ability selection GUI if the player has not selected an ability yet.
Requirements:
* Create a custom inventory GUI.
* Display all 10 available abilities.
* Every ability needs its own icon, name and description.
* Players can select exactly ONE ability.
* After selection, give the player a special ability application item.
* Save the selected ability permanently.
* Players cannot select additional abilities.
* Do not reopen the selection GUI on every login if the player has already selected an ability.
* Add an admin command to reset a player’s selection.
IMPORTANT:
The ability selection does NOT automatically put the ability on the sword.
Players must first craft their own 21SMP Sword and then use an anvil to apply their selected ability.
⸻
5. ANVIL ABILITY SYSTEM
Create a custom anvil system.
How it works:
1. A player selects one ability in the GUI.
2. The player receives the corresponding ability application item.
3. The player crafts a 21SMP Sword.
4. The player puts the sword and ability item into an anvil.
5. The output becomes a 21SMP Sword with the selected ability.
Requirements:
* Only the real custom 21SMP Sword can receive abilities.
* Normal swords cannot receive abilities.
* One ability per sword.
* Prevent replacing an existing ability.
* Prevent item duplication and anvil exploits.
* The resulting sword must display its ability in its lore.
* Store ability data using PersistentDataContainer.
* Ability items must be validated to prevent fake items.
* Ensure the input items are consumed correctly.
⸻
6. THE 10 MAIN ABILITIES
Implement EXACTLY these 10 abilities.
All abilities must be balanced for normal Minecraft PvP.
1. Dash
* Quickly dash forward in the direction the player is looking.
* Cooldown: 8 seconds.
2. Thunder Strike
* Summon a lightning effect on the targeted enemy.
* Use visual lightning without unnecessary environmental damage.
* Cooldown: 15 seconds.
3. Shadow Step
* Teleport a short distance behind the targeted enemy.
* Check if the destination is safe.
* Cooldown: 18 seconds.
4. Earthquake
* Create a small ground shockwave.
* Knock nearby enemies back.
* Cooldown: 16 seconds.
5. Soul Drain
* Steal 1 heart from the damaged enemy.
* Heal the user by the same amount.
* Cooldown: 20 seconds.
6. Flame Blade
* The next sword hit deals a small additional fire effect.
* Cooldown: 15 seconds.
7. Grapple
* Pull the player slightly towards the targeted enemy.
* Cooldown: 14 seconds.
8. Reflect
* Reduce and reflect a portion of the next incoming damage.
* Cooldown: 20 seconds.
9. Strength
* Give the player Strength III for 3 seconds.
* Cooldown: 35 seconds.
10. Turtle Master
* Give the player Resistance IV for 5 seconds.
* DO NOT apply Slowness.
* Cooldown: 35 seconds.
All cooldowns and effect values must be configurable.
⸻
7. ABILITY ACTIVATION
* Shift + Right Click activates the equipped sword’s ability.
* Only activate the ability stored on the sword.
* The player must hold the custom sword.
* Each ability has its own cooldown.
* Cooldowns are player-specific.
* Display cooldown feedback in the actionbar.
* Show clear messages when an ability activates or is unavailable.
* Prevent activation during invalid states.
* Prevent accidental activation when interacting with blocks or inventories.
* Make sure abilities work correctly in multiplayer PvP.
⸻
8. ABILITY COMMAND SYSTEM
Every ability must have its own command.
Commands:
* /21sword dash
* /21sword thunderstrike
* /21sword shadowstep
* /21sword earthquake
* /21sword souldrain
* /21sword flameblade
* /21sword grapple
* /21sword reflect
* /21sword strength
* /21sword turtlemaster
Requirements:
* Every command activates the corresponding ability.
* The player must hold their custom 21SMP Sword.
* The sword must contain the matching ability.
* Cooldowns must always be checked.
* Players cannot activate abilities they have not unlocked or equipped.
* Commands and keybinds must use the same server-side ability activation handler.
* Prevent command spam.
⸻
9. SETTINGS AND KEYBIND SYSTEM
Create a new command:
/settings
When a player enters this command, open a custom settings GUI.
The GUI must include:
* Ability Keybind Settings.
* Current keybind display.
* Change keybind option.
* Reset keybind option.
Keybind System
Players must be able to bind their ability command to a keyboard key.
Examples:
* Dash → R
* Thunder Strike → F
* Shadow Step → G
Requirements:
* Players can choose their preferred key.
* Save keybinds permanently.
* Prevent conflicting keybinds.
* Allow players to change and reset keybinds.
* Keybinds must activate the corresponding ability without manually typing a command.
IMPORTANT TECHNICAL REQUIREMENT:
Paper plugins cannot directly detect arbitrary keyboard presses.
Develop a compatible Fabric client-side mod if necessary.
The client mod must:
* Be compatible with Minecraft 1.21.11.
* Communicate securely with the Paper plugin.
* Allow configurable keybinds.
* Send ability activation requests to the server.
* Never bypass server-side ability validation.
* Include complete source code and build configuration.
The plugin must validate ownership, equipped ability and cooldowns server-side.
⸻
10. CUSTOM ABILITY ICONS AND COOLDOWN HUD
This is a VERY IMPORTANT feature.
Every one of the 10 abilities must have its own unique icon.
Ability Icons
Create 10 visually distinct icons:
1. Dash – Wind/dash symbol.
2. Thunder Strike – Lightning symbol.
3. Shadow Step – Shadow/teleport symbol.
4. Earthquake – Cracked ground symbol.
5. Soul Drain – Soul/energy symbol.
6. Flame Blade – Fire sword symbol.
7. Grapple – Hook symbol.
8. Reflect – Shield/reflection symbol.
9. Strength – Strength/fist symbol.
10. Turtle Master – Turtle shell/shield symbol.
Use a consistent light-blue/cyan 21SMP design theme.
Icons should look clean, recognizable and consistent.
Cooldown HUD
Display the currently equipped sword’s ability icon:
* Directly above the hotbar.
* Horizontally centered on the screen.
* Above the armor/health HUD area.
* Clearly visible without blocking gameplay.
* Show only the currently held custom sword’s ability.
The icon must have a cooldown animation inspired by Minecraft’s Wind Charge cooldown indicator.
Cooldown Animation
When an ability is used:
1. The icon immediately enters its cooldown state.
2. A darkened or desaturated overlay covers the icon.
3. The icon gradually fills back with its original colors from bottom to top.
4. When the cooldown ends, the complete original icon is visible again.
5. The icon should have a smooth and accurate animation.
Also display a small cooldown timer or remaining seconds.
When the ability is ready:
* Show the full-color icon.
* Optionally show a subtle ready effect.
When the player changes hotbar slots:
* Update the displayed icon immediately.
* Display the icon belonging to the ability on the currently held 21SMP Sword.
* Hide the HUD when the player is not holding the custom sword.
IMPORTANT:
Do not use ordinary actionbar text as a replacement for this visual HUD.
I want an actual graphical icon with a filling cooldown animation, similar to the Minecraft Wind Charge cooldown indicator.
If Paper cannot render this exact HUD, implement it through the Fabric client mod using a custom HUD renderer.
The server plugin must send accurate cooldown information to the client.
The HUD must stay synchronized with server-side cooldowns.
Do not allow the client to decide whether an ability is ready.
⸻
11. ADMIN COMMANDS
Create the following commands:
/21sword give
Give a custom 21SMP Sword.
/21sword reset
Reset a player’s ability selection.
/21sword reload
Reload config.yml, messages and crafting recipes without restarting the server.
/21sword info
Display the player’s selected ability.
Add appropriate permissions for every admin command.
⸻
12. CONFIGURATION
Create a detailed config.yml.
It must include:
* Crafting recipe settings.
* All 10 ability cooldowns.
* Ability effect durations.
* Ability damage and knockback values.
* Particle settings.
* Sound settings.
* Login timeout.
* Registration settings.
* Password requirements.
* Messages.
* GUI settings.
* Sword name and lore.
* Ability icon settings.
* HUD settings.
* HUD position and size.
* Cooldown animation settings.
* Keybind settings.
I want to change important settings without touching Java code.
⸻
13. PERFORMANCE AND CODE QUALITY
Technical requirements:
* Paper 1.21.11.
* Java 21.
* Maven or Gradle.
* SQLite database.
* Argon2id or BCrypt password hashing.
* PersistentDataContainer.
* Clean and modular code structure.
* Proper event handling.
* No unnecessary repeating tasks.
* No heavy particle spam.
* Avoid memory leaks.
* Handle player disconnects correctly.
* Handle server restarts correctly.
* Handle item transfers correctly.
* Handle multiplayer situations safely.
* Use efficient plugin-to-client communication.
* Validate all client requests server-side.
The plugin must not create unnecessary server lag.
⸻
14. PROJECT DELIVERY
Deliver:
1. Complete Java source code.
2. Complete Fabric client mod source code if required.
3. plugin.yml.
4. config.yml.
5. messages.yml.
6. Database initialization.
7. Maven or Gradle build files.
8. README with installation and configuration instructions.
9. Compiled Paper plugin JAR.
10. Compiled Fabric mod JAR.
11. Complete ZIP containing all project files.
Before delivery:
* Compile the entire project.
* Fix all compilation errors.
* Check that all commands work.
* Test crafting recipe and reload functionality.
* Test registration and login.
* Test ability selection and anvil application.
* Test all 10 abilities.
* Test every ability icon.
* Test cooldown animations.
* Test keybinds.
* Test multiplayer functionality.
* Check for item duplication exploits.
* Check synchronization between client and server.
* Test on Paper 1.21.11 with Java 21.
Do not leave unfinished features or TODO comments.
I want a complete working plugin and client mod, not just an example or tutorial.
Should I create new projects for the Paper plugin and Fabric client mod, or is this for existing projects you’ll add to the workspace? Also, the spec names both Paper 26.2 and Paper 1.21.11—which version should I target?
Its a plugin for paper 26.2
Got it: the server plugin is for Paper 26.2. There are no projects in this workspace yet. Should I create new projects for the plugin and its companion Fabric mod, or is this for existing projects you’ll add here?
No only plugin no mod only plugin
Understood—plugin only, no Fabric mod. Should I create a new Paper plugin project, or is this for an existing project you’ll add to the workspace?
New
I’ve started the Paper 26.2 plugin project. Since you want plugin-only, it will use sneak + right-click and commands for abilities, with cooldown feedback in the actionbar; arbitrary keyboard keybinds and a custom animated icon HUD require a client mod, so they won’t be included.
Also create the suspect built in the plug-in if you can’t make it built-in send me the suspect separately and tell me how to activate it. The suspect should only change the SWAT to 21 sport and the abilities make the abilities nice make them animated and the word as well.
The generation was stopped before any content could be produced.
A resource pack
[Generation stopped]
Create the plugin and a resource pack linked to the plugin make it so the resource pack
The generation was stopped before any content could be produced.
…Implemented the Java 21 Paper 26.2 21SMP Sword plugin, including the PDC-identified sword and one-use, owner-bound ability sigils; configurable shaped/shapeless crafting; SQLite-backed UUID accounts with BCrypt authentication; and all ten abilities with configurable effects and cooldowns.
Added the permanent-selection and settings GUIs, admin and player commands, plugin metadata, config.yml, messages.yml, manifest.kod, and README. The README also explains offline-mode identity limits and the Paper-only activation and actionbar limitations.
The plugin compiles successfully. What should the resource pack do—change the sword’s appearance, add ability visuals, or both? Should the plugin prompt players to download it when they join? That requires a publicly accessible resource-pack URL; otherwise, I can provide the pack separately with installation instructions.
No files in this session