Ryan Bonner

can you make a plugin, that works like money smp that drops money when you die and you can use the money to add to your balance by right clicking on the money, have everyone start with $100, make the commands /balance to check how much a person has and / . Make it so that people only drop money when they die because of another player, make the money resistant to lava, fire and cactus. make it show a person's balance above their head next to their nametag

Kodari AI
KodariNov 13 at 3:04 am 3
MoneySMP
A Minecraft SMP plugin that implements a death-drop currency system. Every player starts with $100 balance. When a player dies to another player, they drop a configurable percentage of their balance as physical money items. Players right-click dropped money to add it to their balance. Money items are immune to lava, fire, and cactus damage. Commands include /balance to check personal balance, /balance [player] to check another player's balance, and /pay to transfer funds. Each player's balance is displayed above their head next to their nametag, updating in real-time. The plugin uses persistent data storage and configurable drop percentages.

Created the money-drop plugin with $100 starting balances, right-click deposits, /balance (/bal), protected money items, and balance nametag suffixes.

Nametags use scoreboard teams, which may conflict with other plugins managing player teams. Your final command request was cut off after /—what other command would you like?

Ryan Bonner

change the money to points instead. also add teams that operators can use a command to put people into teams with different colors, have each teams balance and add /teamleaderboard and /playerleaderboard to check the team points and player points. Make it so that you cant attack players on your team and each team has their color as their namtag color

Kodari AI
KodariNov 13 at 3:11 am 4
  1. Convert money and balances to points, preserving existing balances.

  2. Add operator-managed colored teams, team scores, and friendly-fire protection.

  3. Add team and player leaderboards and update nametags.

Changed money to points, preserving existing balances and dropped money items. Team scores are the sum of their members’ current points.

Operators can manage teams with:

  • /pointsteam create <team> <color>

  • /pointsteam add <team> <player>

  • /pointsteam remove <player>

  • /pointsteam delete <team>

Added /teamleaderboard and /playerleaderboard. Teammates can’t directly attack or shoot each other, and their nametags use the team color.

Ryan Bonner

can you also make it so that people's locator bar color changes to their team color, also have it so that people only lose 20 points when hey are killed

Kodari AI
KodariNov 13 at 4:26 pm 1
  1. Match locator-bar colors to team colors where the server supports it.

  2. Limit player-kill losses to 20 points.

  • Player kills now drop up to 20 points, or the victim’s remaining balance if it’s lower.

  • Team colors already use scoreboard colors, which also control locator-bar markers on supported Minecraft versions.

Ryan Bonner

can you make a custom texture that is automatically added to the texture pack and forces people to use it when they join for the points

Kodari AI
KodariNov 13 at 4:36 pm 4

Created a custom gold point-token texture.

What Minecraft version is your server running, and does it already use a resource pack? I’ll need that to make the texture compatible and avoid overwriting existing pack assets. Forcing it on join also requires the finished pack to be available at a public HTTPS URL.

Ryan Bonner

it is 1.21.11 and there is another pack, can you also tell me exactly how to implement the pack

Kodari AI
KodariNov 13 at 4:38 pm 1

I’ll link newly dropped point items to the texture and prepare the files for merging into your existing pack. The existing pack’s contents and URL are needed to finish the merge and enforce it on join.

Newly dropped points now use the custom texture when the resource pack is loaded. Existing point items still work, but won’t have the new appearance.

Add it to your existing pack

  1. Compile and download the plugin JAR in Kodari. Open the JAR as a ZIP and find point-pack/assets.

  2. Open your existing resource-pack ZIP. Copy the contents of point-pack/assets into its assets folder, preserving the folder structure.

  3. If your existing pack already has assets/minecraft/items/paper.json, don’t overwrite it—that could break its paper-based items. Send me that file and I can merge the definitions. Also check that custom model data 914071 isn’t already in use.

  4. Save the ZIP, keeping your existing pack.mcmeta at the ZIP’s root. Upload the merged ZIP to a direct public HTTPS URL. You can host it using a deployed Discord bot project on Kodari.

  5. In your server’s server.properties, set:

    Properties
    resource-pack=https://YOUR-DIRECT-URL/pack.zip
    require-resource-pack=true
    
  6. Restart the server and reconnect. Players must accept the pack to join.

The pack isn’t merged or hosted automatically yet: I need your existing pack to merge it safely and its hosted URL to configure delivery.

Ryan Bonner

the file for the pack was deleted but could you make a url for it now and then have me send you the other one later to combine them once i get it back

Kodari AI
KodariNov 13 at 4:42 pm 1

Yes—you can send the recovered pack later, and I can help merge it with the points texture.

I can’t create or deploy a public URL from this plugin project. To host the pack on Kodari, create a Discord bot project and deploy it there; it can serve the ZIP at a public https://<name>.kodaribots.com URL. The points texture files are already in this project, but they still need to be packaged as a complete 1.21.11 resource pack before hosting.

Ryan Bonner

how can i implement the texture pack without using a bot

Kodari AI
KodariNov 13 at 4:48 pm 1

You can use your Minecraft server host’s resource-pack hosting, if it provides a public direct-download link—no Discord bot is needed.

To require the pack for everyone:

  1. Package the points texture files as a Minecraft 1.21.11 resource-pack ZIP. They’re in src/main/resources/point-pack, but still need a pack.mcmeta file before the pack is complete.

  2. Upload that ZIP using your server host’s resource-pack hosting feature and copy its direct HTTPS download URL.

  3. In your server’s server.properties, set:

    Properties
    resource-pack=https://your-direct-download-url/points.zip
    require-resource-pack=true
    
  4. Restart the server. Players will need to accept the pack to join.

Alternatively, players can install the ZIP themselves in their Minecraft resourcepacks folder, but that won’t force everyone to use it.

When you recover the other pack, send it to me and I can help combine them into one ZIP.

Ryan Bonner

can you make the pack.mcmeta file

Kodari AI
KodariNov 13 at 4:54 pm 3

Created pack.mcmeta for Minecraft 1.21.11.

To make the pack ZIP, compress the contents of src/main/resources/point-pack so that pack.mcmeta and the assets folder are at the ZIP’s root.

Ryan Bonner

can you also make a way for operators to give points to people

Kodari AI
KodariNov 13 at 5:04 pm 1

I’ll add an operator-only command that credits points to online or previously joined players and updates their balances.

Added /givepoints <player> <amount> for operators. It works for online players and players who have previously joined, and supports up to two decimal places.

Ryan Bonner

also add a command to see all teams that exist for operators

Kodari AI
KodariNov 13 at 5:04 pm 1
  • Add an operator-only /pointsteam list command.

  • Show every team in its assigned color.

Added /pointsteam list for operators. It lists all teams in their assigned colors.

Ryan Bonner

also add a comamnd to clear and take points away from a player

Kodari AI
KodariNov 13 at 5:09 pm 1
  1. Add operator commands to take points or clear a player’s balance.

  2. Keep team totals and nametags in sync.

Added two operator-only commands:

  • /takepoints <player> <amount> — removes points; rejects amounts greater than the balance.

  • /clearpoints <player> — sets the balance to zero.

Both work for online players and players who have joined before.

Ryan Bonner

also change the amount of points taken when someone kills another person to 20% of their balance, round up when the number isnt whole, eg if someone has 64 points and dies then round to dropping 13 points instead of 12. make a command to change the percentage as well so i can make events that drop more as well as a way to make specific players drop more points

Kodari AI
KodariNov 13 at 5:14 pm 2
  1. Change kill drops to a rounded-up percentage of the victim’s balance.

  2. Add operator controls for the global percentage and individual player overrides.

Player kills now drop 20% of the victim’s balance, rounded up to a whole point and capped at their balance.

Operators can change the rate with:

  • /droppercent global <0-100> — set the server-wide rate.

  • /droppercent player <player> <0-100> — set a player-specific rate.

  • /droppercent player <player> reset — return that player to the global rate.

Rates persist across restarts.

Ryan Bonner

sometimes, i am not able to right click to add the points to my balance

Kodari AI
KodariNov 13 at 9:08 pm 2

I’ll fix deposits for right-clicks that arrive cancelled by the server, and support point items held in either hand.

Fixed point deposits when right-click events are already cancelled, and added support for depositing from either hand.

Kodari can make mistakes. Review important code before using.
Files
src
Code
6 555
src/main/java/com/kodari/moneysmp/MoneySmp.java
package com.kodari.moneysmp;

import com.cryptomorin.xseries.XMaterial;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.OfflinePlayer;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.YamlConfiguration;
import org.bukkit.entity.Item;
import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.entity.EntityDamageEvent;
import org.bukkit.event.entity.PlayerDeathEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scoreboard.Scoreboard;
import org.bukkit.scoreboard.Team;

import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Locale;
import java.util.UUID;

public final class MoneySmp extends JavaPlugin implements Listener {
    private NamespacedKey moneyKey;
    private File balancesFile;
    private YamlConfiguration balances;
    private File teamsFile;
    private YamlConfiguration teams;
    private Scoreboard scoreboard;

    @Override
    public void onEnable() {
        moneyKey = new NamespacedKey(this, "money_cents");
        balancesFile = new File(getDataFolder(), "balances.yml");
        balances = YamlConfiguration.loadConfiguration(balancesFile);
        teamsFile = new File(getDataFolder(), "teams.yml");
        teams = YamlConfiguration.loadConfiguration(teamsFile);
        scoreboard = Bukkit.getScoreboardManager().getMainScoreboard();
        Bukkit.getPluginManager().registerEvents(this, this);
        getCommand("balance").setExecutor((sender, command, label, args) -> {
            if (!(sender instanceof Player)) {
                sender.sendMessage("Only players can check their points.");
                return true;
            }
            sender.sendMessage(ChatColor.GREEN + "Points: " + format(getBalance(((Player) sender).getUniqueId())));
            return true;
        });
        getCommand("givepoints").setExecutor((sender, command, label, args) -> {
            if (!sender.isOp()) {
                sender.sendMessage(ChatColor.RED + "Only operators can give points.");
                return true;
            }
            if (args.length != 2) {
                sender.sendMessage(ChatColor.YELLOW + "Usage: /givepoints <player> <amount>");
                return true;
            }
            OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]);
            if (!target.hasPlayedBefore() && !target.isOnline()) {
                sender.sendMessage(ChatColor.RED + "That player has not joined the server.");
                return true;
            }
            long amount;
            try {
                amount = new BigDecimal(args[1]).movePointRight(2).longValueExact();
                if (amount <= 0) throw new ArithmeticException();
            } catch (NumberFormatException | ArithmeticException ex) {
                sender.sendMessage(ChatColor.RED + "Enter a positive amount with at most two decimal places.");
                return true;
            }
            long balance = getBalance(target.getUniqueId());
            if (balance > Long.MAX_VALUE - amount) {
                sender.sendMessage(ChatColor.RED + "That amount would exceed the maximum balance.");
                return true;
            }
            if (target.isOnline()) {
                Player player = target.getPlayer();
                setBalance(player, balance + amount);
                player.sendMessage(ChatColor.GREEN + "You received " + format(amount) + ". Balance: " + format(balance + amount));
            } else {
                balances.set(target.getUniqueId().toString(), balance + amount);
                saveBalances();
            }
            sender.sendMessage(ChatColor.GREEN + "Gave " + format(amount) + " to " + args[0] + ".");
            return true;
        });
        getCommand("takepoints").setExecutor((sender, command, label, args) -> {
            if (!sender.isOp()) {
                sender.sendMessage(ChatColor.RED + "Only operators can take points.");
                return true;
            }
            if (args.length != 2) {
                sender.sendMessage(ChatColor.YELLOW + "Usage: /takepoints <player> <amount>");
                return true;
            }
            OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]);
            if (!target.hasPlayedBefore() && !target.isOnline()) {
                sender.sendMessage(ChatColor.RED + "That player has not joined the server.");
                return true;
            }
            long amount;
            try {
                amount = new BigDecimal(args[1]).movePointRight(2).longValueExact();
                if (amount <= 0) throw new ArithmeticException();
            } catch (NumberFormatException | ArithmeticException ex) {
                sender.sendMessage(ChatColor.RED + "Enter a positive amount with at most two decimal places.");
                return true;
            }
            long balance = getBalance(target.getUniqueId());
            if (amount > balance) {
                sender.sendMessage(ChatColor.RED + "That player does not have enough points.");
                return true;
            }
            if (target.isOnline()) {
                Player player = target.getPlayer();
                setBalance(player, balance - amount);
                player.sendMessage(ChatColor.YELLOW + format(amount) + " were taken from your balance. Balance: " + format(balance - amount));
            } else {
                balances.set(target.getUniqueId().toString(), balance - amount);
                saveBalances();
            }
            sender.sendMessage(ChatColor.GREEN + "Took " + format(amount) + " from " + args[0] + ".");
            return true;
        });
        getCommand("clearpoints").setExecutor((sender, command, label, args) -> {
            if (!sender.isOp()) {
                sender.sendMessage(ChatColor.RED + "Only operators can clear points.");
                return true;
            }
            if (args.length != 1) {
                sender.sendMessage(ChatColor.YELLOW + "Usage: /clearpoints <player>");
                return true;
            }
            OfflinePlayer target = Bukkit.getOfflinePlayer(args[0]);
            if (!target.hasPlayedBefore() && !target.isOnline()) {
                sender.sendMessage(ChatColor.RED + "That player has not joined the server.");
                return true;
            }
            if (target.isOnline()) {
                Player player = target.getPlayer();
                setBalance(player, 0L);
                player.sendMessage(ChatColor.YELLOW + "Your points balance was cleared.");
            } else {
                balances.set(target.getUniqueId().toString(), 0L);
                saveBalances();
            }
            sender.sendMessage(ChatColor.GREEN + "Cleared " + args[0] + "'s points balance.");
            return true;
        });
        getCommand("droppercent").setExecutor((sender, command, label, args) -> {
            if (!sender.isOp()) {
                sender.sendMessage(ChatColor.RED + "Only operators can change drop percentages.");
                return true;
            }
            String path;
            String value;
            String subject;
            if (args.length == 2 && args[0].equalsIgnoreCase("global")) {
                path = "drop-percent.global";
                value = args[1];
                subject = "Global drop percentage";
            } else if (args.length == 3 && args[0].equalsIgnoreCase("player")) {
                OfflinePlayer target = Bukkit.getOfflinePlayer(args[1]);
                if (!target.hasPlayedBefore() && !target.isOnline()) {
                    sender.sendMessage(ChatColor.RED + "That player has not joined the server.");
                    return true;
                }
                path = "drop-percent.players." + target.getUniqueId();
                value = args[2];
                subject = args[1] + "'s drop percentage";
                if (value.equalsIgnoreCase("reset")) {
                    getConfig().set(path, null);
                    saveConfig();
                    sender.sendMessage(ChatColor.GREEN + subject + " now uses the global percentage.");
                    return true;
                }
            } else {
                sender.sendMessage(ChatColor.YELLOW + "Usage: /droppercent global <0-100> | /droppercent player <player> <0-100|reset>");
                return true;
            }
            try {
                BigDecimal percent = new BigDecimal(value);
                if (percent.compareTo(BigDecimal.ZERO) < 0 || percent.compareTo(BigDecimal.valueOf(100)) > 0