thechillguy

make me a minecraft mod (.jar) for version 26.2 and the features are that it shows a toast when someone pays you on donut smp like this

Kodari AI
KodariNov 9 at 5:49 pm 2
DonutPaymentToasts
A Minecraft Fabric mod for version 26.2 that displays a toast notification on the player's screen whenever they receive a payment on the Donut SMP server. The mod intercepts payment events from the server's economy system and renders a custom toast UI element showing the payer's name and the amount received. It includes configurable toast duration, position, and styling options. The mod is client-side only, requires no server installation, and integrates seamlessly with the existing Donut SMP payment system. It provides instant visual feedback when money is received, ensuring players never miss a payment while playing.

Plan:

  1. Inspect Fabric’s incoming-chat and HUD callback signatures for 26.2.

  2. Use owo’s HUD guidance to build a lightweight payment toast matching the reference.

  3. Create the Fabric mod, dependency manifest, and metadata from scratch.

Created the Minecraft 26.2 Fabric client mod. It watches chat and system messages for payments such as veysn paid $10M or veysn paid you $10M, then shows a five-second toast with a dark background, green accent, yellow name, and green amount.

To get the .jar: click Compile in the top bar, click Compile in the window, then click Download when the build succeeds.

thechillguy

but make it it the top right corner that pic is just for the design

Kodari AI
KodariNov 9 at 5:50 pm 1
  1. Check how the toast is currently positioned.

  2. Update its placement to the top-right while keeping the reference design.

Updated PaymentToast to explicitly anchor each toast at the top-right, stacking additional toasts below it. The reference image remains the visual design.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
manifest.kod
settings.gradle
Code
7 163
src/client/java/com/kodari/donutpaymenttoast/client/DonutPaymentToastClient.java
package com.kodari.donutpaymenttoast.client;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents;
import net.minecraft.network.chat.Component;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class DonutPaymentToastClient implements ClientModInitializer {

    private static final Pattern PAYMENT = Pattern.compile(
            "(?i)(?:^|\\s)([A-Za-z0-9_]{1,16})\\s+paid\\s+(?:you\\s+)?\\$\\s*([0-9][0-9,]*(?:\\.[0-9]+)?\\s*[KMBT]?)\\b"
    );

    @Override
    public void onInitializeClient() {
        ClientReceiveMessageEvents.GAME.register((message, overlay) -> handlePayment(message));
        ClientReceiveMessageEvents.CHAT.register((message, playerChatMessage, sender, boundChatType, timeStamp) -> handlePayment(message));
    }

    private static void handlePayment(Component message) {
        Matcher matcher = PAYMENT.matcher(message.getString());
        if (!matcher.find())
            return;

        String playerName = matcher.group(1);
        String amount = matcher.group(2).replaceAll("\\s+", "");
        PaymentToast.show(playerName, amount);
    }
}