Kasper

Make a minecraft mod, where you can duplicate your inventory by doing /dupe and it just duplicates your inventory

Kodari AI
KodariSep 21 at 5:31 pm 3
InventoryDuplicator
Adds a /dupe command that duplicates the player's entire inventory, including items, armor, and off-hand contents. The duplicated items are added to the player's inventory if space allows, or dropped at their feet when full. Includes configurable cooldown and permission settings to prevent abuse, with a simple and intuitive command interface for both survival and creative gameplay.
  1. Create the Fabric Loom project configuration for Minecraft 1.21.11.

  2. Add the common mod entrypoint and /dupe command registration.

  3. Add the command implementation that copies every non-empty inventory stack back into the player inventory without mutating the originals.

  4. Add the required mod metadata and license file.

Created a Fabric 1.21.11 mod with:

  • /dupe command for players

  • Duplicates every non-empty inventory stack

  • Inserts copies into available inventory space

  • Drops overflow items if the inventory is full

  • Includes complete Fabric Loom project configuration and metadata

Run with:

Shell
./gradlew build

The built mod will be in build/libs/.

Kasper

Make it, so i can use it on my multiplayer server. So no op needed

Kodari AI
KodariSep 21 at 5:38 pm 4

Updated /dupe to explicitly allow all command sources, so any player can use it on a multiplayer server without being an operator. No permission plugin or OP status is required.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
LICENSE
settings.gradle
Code
7 173
src/main/java/com/kodari/inventorydupe/InventoryDupeMod.java
package com.kodari.inventorydupe;

import net.fabricmc.api.ModInitializer;

public final class InventoryDupeMod implements ModInitializer {
    public static final String MOD_ID = "inventorydupe";

    @Override
    public void onInitialize() {
        DupeCommand.register();
    }
}