Vini amp
📎 1 file 13,739 chars
📄
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.
Kodari AI
KodariNov 13 at 6:57 pm 1

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?

Vini amp

Its a plugin for paper 26.2

Kodari AI
KodariNov 13 at 6:58 pm 1

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?

Vini amp

No only plugin no mod only plugin

Kodari AI
KodariNov 13 at 6:59 pm 1

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?

Vini amp

New

Kodari AI
KodariNov 13 at 7:00 pm 1
Created 21SMP Custom SwordPlugins
Delegated to 21SMP Custom Sword Running
Build the user's 21SMP Custom Sword as a complete Paper server plugin, targeting Paper 26.2, Java 21. Plugin only: do NOT create a Fabric/client mod. Read the generated project structure first, then implement production-quality code using its existing build system. Include source, plugin metadata, detailed config.yml, messages.yml, README and required dependency declarations in manifest.kod. Do not write test files/scripts and do not claim to compile or test; compilation is run separately by the workspace. Implement the server-feasible requirements from the attached specification: 1) Unique cyan/light-blue 21SMP Sword identified only by namespaced PersistentDataContainer keys; configurable name/lore; no ordinary sword may trigger abilities. Players get it only through its configurable recipe or admin give command. Store an ability ID directly on sword PDC so it persists through transfers/storage. 2) Fully configurable shaped/shapeless crafting recipe, enable/disable, shape, ingredient material and amounts, reasonable custom-item ingredient matching where feasible, validation with clear console errors, and live /21sword reload without restart. Register/update recipe safely on reload. Example in the user's specification must be supported. 3) Offline-mode authentication: SQLite accounts keyed by UUID; Argon2id or BCrypt with unique salts, no plaintext storage/logging; registration `/register <password> <password>`, login `/login <password>`, configurable timeout (10 seconds default), password length validation, kick unauthenticated users, suppress password command arguments from logging where possible, and block gameplay/interactions/inventory/chat/commands until authenticated except auth commands. Explain in README that this is not Mojang online authentication and has the limits of offline-mode UUID identity. Ensure DB resources close cleanly. 4) Exactly the 10 named abilities from the spec (Dash, Thunder Strike, Shadow Step, Earthquake, Soul Drain, Flame Blade, Grapple, Reflect, Strength, Turtle Master), balanced implementation and configurable cooldown/effect values, particles/sounds, safe target/destination checks, no environmental lightning damage, multiplayer-safe target handling. Cooldowns are per-player, server-authoritative, persist only as appropriate (clear in-memory on quit), actionbar feedback. Activate with sneak + right-click while holding the actual custom sword; implement `/21sword <ability>` through the exact same validation/activation handler, requiring matching stored sword ability and checking cooldown. Respect invalid states and prevent accidental block interactions. 5) Selection GUI with exactly ten distinct icons/names/descriptions; one permanent selection; grant a PDC-validated ability application item on selection; no repeat GUI after selection. Anvil application must only combine a genuine sword and genuine application item, prevent existing/replaced ability, validate ownership/selected ability, consume inputs without duplication, and put the ability in sword PDC/lore. Admin reset selection and info. 6) Commands: `/21sword give <player>`, `/21sword reset <player>`, `/21sword reload`, `/21sword info <player>` and ten ability subcommands. Add permission checks for admin actions, tab completion, useful messages. Include `/settings` GUI only for settings that a Paper plugin can genuinely support. 7) Detailed configuration/messages for recipe, sword, all ability cooldowns and meaningful effect values, particles/sounds, login/password settings, GUI and messages. Configuration errors must fail safely with clear log messages. 8) Keep code modular, efficient, avoid unnecessary repeating tasks, cleanly handle quit/restart and item state, and document install/config/commands/permissions in README. Important platform limits: a Paper plugin alone cannot read arbitrary keyboard key presses or render a custom graphical HUD icon with a smooth client-side cooldown fill. Since the user explicitly requested plugin only and no mod, DO NOT pretend to implement those client-only features. Do not add fake/nonfunctional keybind or icon HUD settings. Provide honest documentation that player-triggered activation is sneak+right-click or command, and display cooldowns via actionbar instead of claiming a graphical icon HUD. It is okay to omit those unimplementable client features; clearly state the limitation in README. Do not claim full test coverage or add unfinished TODO/pseudocode. Make the source implementation complete for supported features.

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.

Vini amp

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.

Kodari AI
KodariNov 13 at 7:01 pm 1

The generation was stopped before any content could be produced.

Vini amp

A resource pack

Kodari AI
KodariNov 13 at 7:01 pm 1

[Generation stopped]

Vini amp

Create the plugin and a resource pack linked to the plugin make it so the resource pack

Kodari AI
KodariNov 13 at 7:02 pm 1

The generation was stopped before any content could be produced.

Report from 1 project
TaskBuild the user's 21SMP Custom Sword as a complete Paper server plugin, targeting Paper 26.2, Java 21. Plugin only: do NOT create a Fabric/client mod. Read the generated project structure first, then i...

…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.

Kodari AI
KodariNov 13 at 7:38 pm 1
Compiled TwentyOneSMPCustomSwordSucceeded

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.

Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code