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

Overview

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 hand and run /commander "<command>" [CONSUME_ACTION] [COMMAND_SOURCE]

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

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

This mod supports LuckPerms' Fabric Permission API.

  • commander.command.create allows a player to use this mod to embed commands in items

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.

You might also like...

An elegant Minecraft mod template for the Fabric mod loader

An elegant Minecraft mod template for the Fabric mod loader

Fabric Example Mod Lorem ipsum dolor sit amet Example is a Minecraft mod that lorem ipsum dolor sit amet. Ut mi lectus, egestas a justo nec, hendrerit

Dec 25, 2022

Addon to the Minecraft Forge/Fabric mod InvMove that adds mod compatibilities

Addon to the Minecraft Forge/Fabric mod InvMove that adds mod compatibilities

Oct 21, 2022

CustomHandGUI - This mod allows you to change hands position on screen

CustomHandGUI - This mod allows you to change hands position on screen

CustomHandGUI This mod allows you to change hands position on screen And you can change your main hand to be left hand! Keybindings: F - Swaps hands.

Apr 11, 2022

A simple forge mod which allows deepslate to be instamined

InstantDeepslate An extremely simple mod that allows you to instantly mine deepslate. This works by changing the blast resistance and break time value

Jan 26, 2022

This plugin disables commands specified in the configuration and prevents granting the "OP" authority to people not authorized in the plugin configuration.

This plugin disables commands specified in the configuration and prevents granting the

Ares This plugin disables commands specified in the configuration and prevents granting the "OP" authority to people not authorized in the plugin conf

Aug 30, 2022

Spigot plugin with a bunch of quite useful commands in it!

Spigot plugin with a bunch of quite useful commands in it!

QuiteUsefulCommands Spigot plugin with a bunch of quite useful commands in it. Install Download the latest release and drag it into your server's plug

Aug 20, 2022

This minecraft plugin adds @a, @p, and @r to EssentialsX Commands! Works with command block and console aswell!

EssentialsX-Target-Selectors This minecraft plugin adds @a, @p, and @r to EssentialsX Commands! Works with command block and console aswell! Usage: Ju

Dec 7, 2022

Minecraft plugin that is providing all essential commands for Staff!

Staff Essentials Minecraft plugin that is providing all essential commands for Staff! Current goal is to add new functionalities and fix open bugs. I

Sep 21, 2022

Brings marriage to Minecraft servers using commands.

MarriageLab MarriageLab is a plugin that brings marriage to Minecraft servers using commands. It has been tested on Spigot and Paper. Requeriments Thi

Oct 8, 2021
Comments
  • Suggestions for improvement

    Suggestions for improvement

    Forgive me if these are already possible, i'm not too advanced with commands..

    I'd like to suggest a couple of features that'll help ItemCommander be a REALLY powerful mod to use!

    1. Item cooldowns, for items that are running commands, it'd be nice if it was possible to set a cooldown for them so players can't spam them, just to give them some more customizability

    2. Multiple commands ran by one item, I'm not sure if this is already possible, but it'd be super neat, to be able to add a command, then also add a particle command, so when the item is right-clicked it'll do a particle effect and run the command!

    opened by Alkiasan 2
  • Commander Items on Lecterns

    Commander Items on Lecterns

    This is exactly what I needed for my vanilla multiserver world. I currently have the commands bound to books that port people to and from different servers "Myst" Ages style. Is there a way to apply a command to a lectern with a book on it? Or have the object remain behind after use (I guess a drop command they teleport?) I want to keep the book (or the lecturn with the book) where it is when they get teleported.

    enhancement 
    opened by RotokEralil 2
  • Commander creates nbt on items without it on click

    Commander creates nbt on items without it on click

    You use ItemStack#getOrCreateNbt to get the stacks nbt for running commands, but this method has a problem. It creates the nbt if it's missing. Items with no nbt and empty nbt don't stack. The best solution is probably to not try to run a command when there isn't any nbt.

    opened by MattiDragon 1
  • [meta] Command fires twice when using onBlockInteraction

    [meta] Command fires twice when using onBlockInteraction

    This is regarding the commented out section of code here: https://github.com/CamperSamu/ItemCommander/blob/7bd918840ff75cb0d5dd326ddd083150141f8351/src/main/java/com/campersamu/itemcommander/mixin/ItemInteractMixin.java#L34

    Apparently the WorldEdit folks are having the same problem, as seen in https://github.com/EngineHub/WorldEdit/issues/1439 and related issues.

    opened by dragonmaus 0
Releases(1.4.0)
Owner
null
A client-side Fabric mod for Minecraft Beta 1.7.3 that allows you to connect to servers running almost any patch from Alpha v1.1.2_01 to Beta 1.7.3.

multiversion-fabric A client-side Fabric mod for Minecraft Beta 1.7.3 that allows you to connect to servers running almost any patch from Alpha v1.1.2

0n1 2 Mar 13, 2022
Carpet Addition for Shadow Item Related Tweaks/Fixes

Carpet Shadow carpet extension to fix various bugs related to shadow item stacks Carpet Settings shadowItemMode what should happen to shadow items whe

null 18 Jan 6, 2023
A minecraft server plugin which allows user to custom commands. 一个支持你在 MC 服务器自定义指令的插件。

CustomCommands:自定义指令 CustomCommands 插件也叫 CCS(CustomCommandS)或 Custom-Commands 等,允许自己设置一些指令的格式,以简化输入。 插件 QQ 群:1028582500 作者:椽子。 明城京联合太学,保留所有权利。 请遵循 GNU

CHUANWISE 13 Feb 10, 2022
C2ME-fabric - A Fabric mod designed to improve the chunk performance of Minecraft.

C^2M-Engine A Fabric mod designed to improve the chunk performance of Minecraft. So what is C2ME? C^2M-Engine, or C2ME for short, is a Fabric mod desi

null 414 Jan 7, 2023
A Fabric mod that allows for efficient connected textures

Continuity Continuity is a Fabric mod built around modern APIs to allow for the most efficient connected textures experience possible. It is designed

null 192 Jan 9, 2023
A Fabric mod that allows using RakNet as Minecraft networking backend.

RaknetFabric A Fabric mod that allows using RakNet as Minecraft networking backend. Features Higher reliability and lower latency under unreliable and

null 75 Jan 3, 2023
Essentials - Minecraft server command mod - Adds over 100 commands for use in-game to help manage a server

Essentials Development Readme The official repository is at: https://github.com/essentials/Essentials We use NetBeans 7.3 for development. Recommended

Essentials 811 Jan 7, 2023
just a fabric mod that gives you the ability to change your viewmodel. done for volker1 on discord.

viewmodel-changer just a fabric mod that gives you the ability to change your viewmodel. done for volker1 on discord. how-to-use to open the gui, pres

null 21 Dec 30, 2022
resetchunks is a tiny fabric mod that re-adds the /resetchunks command, allowing you to regenerate one or more chunks

resetchunks is a tiny fabric mod that enables the /resetchunks command, allowing you to regenerate one or more chunks.

Potassium 5 Jul 25, 2022
A fabric mod and api that lets you change player gravity direction

GravityChanger A fabric mod and api that lets you change player gravity direction. Features This mod adds 6 items that let you change your gravity to

null 16 Aug 27, 2022