tboter.exe

can you make a offhand dupe sytem for paper which works mincraft 1.21.11 which fixes the ghost sytem and make it real i want a mod

Kodari AI
KodariOct 21 at 4:30 am 1
OffhandDupeFixer
A Minecraft Fabric mod for version 1.21.11 that prevents offhand duplication glitches by synchronizing server-side inventory state with client actions. It intercepts offhand swap operations, validates item integrity through server-side checks, and corrects ghost item discrepancies in real-time. The mod implements a robust anti-dupe system that ensures item counts remain consistent across all player interactions, eliminating the classic offhand duplication exploit while maintaining smooth gameplay performance.

Paper plugins and Fabric mods are different project types. Do you want a Paper 1.21.11 plugin or a Fabric 1.21.11 mod? I can make the offhand duplication happen server-side so the copied item is real, not just a client-side ghost.

tboter.exe

make it for keybind b and it will start duping holding item

Kodari AI
KodariOct 21 at 4:44 am 2
  1. Create a Fabric 1.21.11 mod with a B keybind that requests a server-side copy of the held stack into the offhand.

  2. Keep duplication server-authoritative; it requires the mod on the server (and won’t run on a Paper server).

  3. Add the minimal Fabric project and metadata files.

Added a Fabric 1.21.11 mod: press B to copy your main-hand stack into an empty offhand. The copy is made server-side, so it’s real and includes the stack’s data.

This is a Fabric mod, not a Paper plugin. Install it on both the client and a Fabric server (or use it in singleplayer); it will not work on a Paper server.

tboter.exe

i want this to work on paper server

Kodari AI
KodariOct 21 at 4:53 am 2

Plan: keep B as the client keybind, have it issue a command Paper understands, and add a Paper plugin handler that performs the server-side copy. The client mod is still required for the B key; the Paper plugin alone cannot detect keyboard input.

Added Paper-server support: pressing B in the Fabric client mod now sends /offhanddupe, and the Paper plugin copies the main-hand stack into an empty offhand server-side.

Install the compiled JAR as a Paper plugin on the server and as a Fabric mod on each client. The plugin alone cannot detect the B key. The copy only works when the offhand is empty.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
8 159
src/main/java/com/kodari/offhanddupe/OffhandDupePlugin.java
package com.kodari.offhanddupe;

import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;

public class OffhandDupePlugin extends JavaPlugin {
    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("This command can only be used by a player.");
            return true;
        }

        ItemStack held = player.getInventory().getItemInMainHand();
        if (held.getType().isAir()) {
            player.sendMessage("Hold an item in your main hand first.");
            return true;
        }

        if (!player.getInventory().getItemInOffHand().getType().isAir()) {
            player.sendMessage("Your offhand must be empty.");
            return true;
        }

        player.getInventory().setItemInOffHand(held.clone());
        return true;
    }
}