Back to mods
Item Commander project artwork

Modrinth · Minecraft mod

Item Commander

A simple Serverside Fabric mod that allows you to assign commands to Item(Stacks)

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which Item Commander release should I use?

Updated 2 years ago
Latest stable file 1.6.2+1.20.4
Game version 1.20.3, 1.20.4
Loader Fabric, Quilt

Item Commander 1.6.2+1.20.4 targets 1.20.3, 1.20.4 with Fabric, Quilt. Do not install it on the client. It must be installed on the dedicated server. No extra mods listed for this file.

Where it goes

Is Item Commander required on the client, server, or both?

Do not install it on the client. It must be installed on the dedicated server.

Client Not supported
Dedicated server Required
Loader for this release Fabric, Quilt
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This file is marked server-only.

What else does Item Commander 1.6.2+1.20.4 need?

1.6.2+1.20.4. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

Text Placeholder API Optional for Item Commander 1.6.2+1.20.4
optional
Matching file found Matched file: 2.4.0-pre.3+1.20.4
LuckPerms Optional for Item Commander 1.6.2+1.20.4
optional
Matching file found Matched file: v5.4.113-fabric

We only count dependency files that match this setup. A file for another loader does not fill the gap.

Before you install it

Add Item Commander without breaking your instance.

Built for Item Commander 1.6.2+1.20.4. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.6.2+1.20.4. It targets 1.20.3, 1.20.4 with Fabric, Quilt; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    Do not install it on the client. It must be installed on the dedicated server.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.6.2+1.20.4. It opens that exact file at the source.

About this project

What does Item Commander add?

Item Commander

Shiny item do stuff

A simple Serverside Fabric mod that allows you to assign commands to Item(Stacks).
It works by adding NBT data to the item, then when a player uses an item the NBT data for that item is checked, if it contains the ItemCommander tag tree it executes the specified command.

To embed a command in an item, hold it in your main hand and run /commander create "<command>" [CONSUME_ACTION] [COMMAND_SOURCE] [cooldownTicks] [CustomItemNBT]

consume actions:

Action Description
CONSUME Consumes the item
KEEP Keeps the item

command sources:

Action Description
SERVER Command executed by the server
PLAYER Command executed by the player
OP Command executed by the player with OP
SERVER_AS_PLAYER Command executed by the server as the player (like OP)
DANGEROUSLY_OP Command executed by the player whilst being OP ⚠️

defaults in bold*

Command placeholders

when creating a command you can use the following vanilla-like placeholders:

Placeholder Action
@itemname Item Name
@pich Player pitch
@yaw Player yaw
@ix Item use X coordinate
@iy Item use Y coordinate
@iz Item use Z coordinate
@x Player use X coordinate
@y Player use Y coordinate
@z Player use Z coordinate
@p and @s The player using the Commander Item

To append more commands to one item, hold a Commander Item in your main hand and run /commander append "<command>"
To save a Commander Item, hold it in your main hand and run /commander save <fileName>
To load/give a Commander Item, run /commander give <fileName> [quantity] [player(s)]

This mod supports Patbox' Text Placeholders API.

  • You can use %modid:type% or %modid:type/data% inside a Commander Item to make use of a custom placeholder
  • Example: commander create

This mod supports LuckPerms' Fabric Permission API.

  • commander.command.create allows a player to use this mod to embed commands in items
  • commander.command.append allows a player to use this mod to append commands to Commander Items
  • commander.command.give allows a player to use this mod to give itself Commander Items
  • commander.command.save allows a player to use this mod to save Commander Items to a file on the server

Examples

Creating a Commander Item

/commander create "say Hello myself (@s), you clicked at @ix, @iy, @iz!" KEEP OP 20 paper{display:{Name:'[{"text":"Commander Test Item!","italic":false}]'}}

Appending an extra command to a Commander Item

/commander append "If you have Text Placeholder API, this will be your name: %player:name%"

Saving a Commander Item

/commander save commander_test_item 

Giving/loading a saved item to a player

/commander give commander_test_item 1 @p

Bleeding edge builds

Upstream builds are available via GitHub Actions.


Setup

For setup instructions please see the fabric wiki page that relates to the IDE that you are using.

License

This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

Project description from Modrinth.

Pick your setup

Item Commander by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

24 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

Item Commander versions and loaders

13 of 13 releases match

Looking for an older file? The official Modrinth project page is in Resources.