> Create a fully functional Paper 1.21.11 Minecraft plugin called GodSword with the following exact specifications. Do not use any deprecated APIs. Use modern Paper/Adventure API for text components. The plugin should compile with Java 21. > > --- > > ITEM CREATION — /nullblade give <target> > > - <target> must support both exact player names and Minecraft selectors (@p, @a, @r, @s, @e[type=player,...]) > - The item is a renamed, unbreakable Netherite Sword with a persistent PersistentDataContainer tag (namespace: godsword, key: nullblade) so the plugin can reliably identify it separate from regular netherite swords > - Item name: Nullblade in color black (#000000) using Adventure API's TextColor > - Lore: Crafted from the darkest part of the world. in dark gray (#404040) using Adventure API > - The sword is fully enchantable by the player in vanilla — do not pre-apply any enchantments > - Unbreakable via ItemMeta.setUnbreakable(true) > - Cannot be destroyed except by being thrown into the void (void despawn is vanilla behavior, acceptable) > - CustomModelData: 9005 (for future resource pack / 3D model use) > - Base attack damage: 10 — set this via the GENERIC_ATTACK_DAMAGE attribute modifier on the item itself so it applies only when holding the Nullblade > > --- > > PERMANENT EFFECTS WHILE HOLDING IN MAIN HAND > > Apply all of the following potion effects via a repeating scheduler (every 5 ticks) that checks if the item in the player's main hand contains the godsword:nullblade PDC tag. Apply effects only while holding, remove them immediately when the player switches away, drops the item, or quits: > > - Speed II > - Strength I > - Fire Resistance (level 1) > - Resistance I > > Detect unhold via PlayerItemHeldEvent, PlayerDropItemEvent and PlayerQuitEvent — on any of these, remove all 4 effects if the player is no longer holding the Nullblade in main hand. > > --- > > THORNS IMMUNITY > > - When a Nullblade wielder attacks any player or entity, cancel any reflected thorns damage that would be dealt back to the attacker > - Implement via EntityDamageByEntityEvent — when the damager is a player holding the Nullblade (PDC check on main hand item) and the damage cause on a subsequent event would be THORNS, cancel it entirely > - The sword wielder should never take thorns reflected damage while holding the Nullblade under any circumstance > > --- > > COMMANDS > > Register under /nullblade: > - /nullblade give <target> — requires permission godsword.give > > Declare all commands and permissions in paper-plugin.yml > > --- > > GENERAL REQUIREMENTS > > - Clean up all potion effects and attribute modifiers on PlayerQuitEvent, PlayerItemHeldEvent, and PlayerDropItemEvent when the Nullblade is no longer in main hand > - Use NamespacedKey for all PDC operations > - No NMS unless strictly necessary — prefer Paper API throughout > - Handle null-safety everywhere: offline players, invalid arguments, empty hands > - Send clear colored feedback messages to the command sender on success and failure > - Include a comment in code noting that CustomModelData 9005 maps to the Nullblade for the resource pack / 3D model artist