gepardhockey_yt_75074

so there will be a custom trident wich will have the ability to pull people to and there will be a bounty list when you press tab you will see people with bounty and if you kill someone with a bounty you will get a trident wich you can use for uprade a normal trident to a abilyty trident

Kodari AI
KodariSep 21 at 4:24 pm 2
BountyTrident
A Minecraft plugin introducing a custom ability trident that pulls players toward the thrower upon impact. Players can view an active bounty list by pressing the Tab key, displaying all wanted players and their bounty values. Killing a bounty target rewards the killer with a special trident item, which can be used to upgrade a standard trident into the ability trident. The plugin manages bounty assignments, kill tracking, and trident upgrades through a configurable system, integrating seamlessly with the server's combat mechanics.
  1. Create the Gradle/Paper plugin scaffold and runtime configuration.

  2. Add persistent bounty storage, bounty commands, and tab-list display.

  3. Add bounty-kill rewards and the offhand-core upgrade flow.

  4. Add the pull ability to upgraded tridents and register all components.

Created the BountyTridents plugin from scratch.

Features included:

  • Persistent bounty storage in config.yml

  • /bounty list

  • /bounty set <player> <amount>

  • /bounty upgrade

  • /bounty reload

  • Bounty amounts displayed in the tab list

  • Killing a player with a bounty rewards a Bounty Trident

  • Hold a normal trident in the main hand and Bounty Trident in the offhand to upgrade it

  • Upgraded Pull Trident pulls hit players toward the shooter

  • Paper 1.21.4 Gradle project setup with XSeries support

gepardhockey_yt_75074

make it on 1.22

Kodari AI
KodariSep 21 at 4:27 pm 1
  1. Update the Paper API dependency to 1.22-R0.1-SNAPSHOT.

  2. Set the plugin descriptor’s API version to 1.22.

  3. Leave gameplay code unchanged because it uses version-stable Bukkit/Paper APIs and XSeries.

Updated the plugin for Minecraft/Paper 1.22:

  • Paper API: 1.22-R0.1-SNAPSHOT

  • Plugin API version: 1.22

  • Gameplay code remains unchanged and uses compatible Bukkit APIs.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 491
src/main/java/com/kodari/bountytridents/BountyTridentsPlugin.java
package com.kodari.bountytridents;

import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

public final class BountyTridentsPlugin extends JavaPlugin {

    private BountyManager bountyManager;
    private TridentManager tridentManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        bountyManager = new BountyManager(this);
        tridentManager = new TridentManager(this);

        BountyListener listener = new BountyListener(this);
        Bukkit.getPluginManager().registerEvents(listener, this);

        BountyCommand command = new BountyCommand(this);
        if (getCommand("bounty") != null) {
            getCommand("bounty").setExecutor(command);
            getCommand("bounty").setTabCompleter(command);
        }

        refreshTabList();
        getLogger().info("BountyTridents enabled.");
    }

    @Override
    public void onDisable() {
        if (bountyManager != null) {
            bountyManager.save();
        }
    }

    public BountyManager getBountyManager() {
        return bountyManager;
    }

    public TridentManager getTridentManager() {
        return tridentManager;
    }

    public void refreshTabList() {
        for (Player player : Bukkit.getOnlinePlayers()) {
            int bounty = bountyManager.getBounty(player.getUniqueId());
            String suffix = bounty > 0
                    ? ChatColor.DARK_RED + " [$" + bounty + "]"
                    : ChatColor.GRAY + " [No bounty]";
            player.setPlayerListName(ChatColor.WHITE + player.getName() + suffix);
        }
    }
}