Make a minecraft mod, where you can duplicate your inventory by doing /dupe and it just duplicates your inventory
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.
Create the Fabric Loom project configuration for Minecraft 1.21.11.
Add the common mod entrypoint and /dupe command registration.
Add the command implementation that copies every non-empty inventory stack back into the player inventory without mutating the originals.
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/.
Make it, so i can use it on my multiplayer server. So no op needed
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.
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();
}
}