Implement the Custom Gems feature set in this fresh Paper 1.21 plugin project. The user said they want all requested capabilities: passive effects, activated abilities, crafting and combining upgrades, and gem handling on death. Inspect the project’s current files and preserve its existing package/build conventions; add the feature code and configuration needed.
Requirements:
Add identifiable custom gem items, with sensible built-in examples including Speed, Strength, and Flight gems. Passive abilities should apply while the gem is held in the main hand; make effects configurable where practical. Correctly stop/revoke effects or flight granted by a gem when it is no longer held, and avoid overwriting player flight state the plugin did not grant.
Support activated gem abilities on right-click as well as passives. Provide a small, sensible default active ability (e.g. a configurable potion effect) and configurable cooldown; prevent vanilla interaction side effects where appropriate. Make gem names, effects, and cooldown settings configurable.
Support both crafting recipes for gems and combining lower-tier gems into higher-tier gems. Include example default recipes/upgrades, and make the recipes/upgrades configurable. Validate that only genuine plugin gems count, and handle inventory capacity/consumption safely.
On death, support both dropping gems and transferring them to the killer. These outcomes are mutually exclusive for a given gem, so expose a config choice (e.g. DROP or TRANSFER_TO_KILLER) and document the default and behavior when there is no killer. Do not duplicate or lose gems.
Include clear player-facing instructions/messages and configuration comments/defaults. Integrate with plugin startup/shutdown and clean up any scheduled tasks/state. Keep the implementation compatible with Paper 1.21 APIs and this project’s current structure.
Implement the requested feature code only; do not add tests or attempt to build. Report the files/features changed and any relevant usage/config details.
KodariOct 19 at 10:56 am 2
CustomGemsEffects
Implements a comprehensive custom gem system for Paper 1.21 with passive abilities (Speed, Strength, Flight) applied while held in main hand, activated right-click abilities with configurable cooldowns, crafting recipes and tier-upgrade combining system, and configurable death handling (DROP or TRANSFER_TO_KILLER). Features fully configurable gem definitions, effects, and recipes via YAML configuration with sensible defaults for Speed, Strength, and Flight gems. Includes proper state management for flight restoration, inventory capacity validation, and clean plugin shutdown.
Inspect the project’s plugin/build structure and existing configuration.
Implement configurable gems, passive/active abilities, recipes/upgrades, and death handling.
Register and clean up plugin state; add player instructions and configuration defaults.
Added the Custom Gems plugin implementation in four files:
CustomGemsPlugin.java and GemManager.java: startup/shutdown, /gems help, passive abilities, right-click abilities and cooldowns, recipes/upgrades, and death handling.
plugin.yml: plugin entry point and command registration.
config.yml: configurable gem definitions, effects, recipes, upgrades, messages, and death outcome.
Defaults include Speed, Strength, Flight, and Greater Speed gems. Passives apply while a genuine gem is held in the main hand; potion effects and plugin-granted flight are revoked when it is no longer held. Recipes and upgrades require valid gem data. Death handling defaults to DROP; TRANSFER_TO_KILLER transfers gems when there is a killer and drops them otherwise. Gems are still dropped or transferred when keep-inventory is enabled.
Players can use /gems for instructions. No build or tests were run.
Kodari can make mistakes. Review important code before using.