Bind command(s) to an item
I am not a native English Speaker, sorry for possible mistakes, please refer to Chinese version using translator or check source code.
2026.5.23
Versions 2.0.0 and later are no longer compatible with versions 1.X.X. Items already in world will nolonger work. No impacts to configuration.
Major changes:
CommandItem2 is a powerful and highly customizable Minecraft plugin for Purpur servers that allows administrators to create unique items with special abilities. These items can execute commands, have cooldowns, require specific permissions, and more, with all their properties stored directly on the item itself using Persistent Data Containers (PDC). This ensures that items retain their unique characteristics even when traded or stored.
Strict mode can be used for compatibility with older versions or special items modified by administrators. If this mode is disabled, ensure that players do not have permission to modify the item's NBT data; otherwise, serious consequences may occur.
| Command | Description | Permission |
|---|---|---|
| /ci reload | Reloads the plugin's configuration. | commanditem.admin |
| /ci get <id> [amount] | Gives the player a specified special item. | commanditem.admin |
| /ci | Shows the help message. | commanditem.admin |
Player Permissions:
Use these placeholders in any other plugin that supports PlaceholderAPI.
| Placeholder | Description | Example Output |
|---|---|---|
| %commanditem_cooldown_<item_id>% | Shows the formatted remaining cooldown for an item. | 1m 15s / Ready |
| %commanditem_cooldown_s_<item_id>% | Shows the remaining cooldown in seconds. | 75 / 0 |
| %commanditem_name_<item_id>% | Shows the MiniMessage-formatted name of the item. | Infernal Blade |
If you want to compile the plugin yourself, follow these steps:
Clone the repository:
git clone <repository_url>
cd CommandItem2
Ensure you have JDK 17 or newer installed.
Build the JAR using Gradle:
On Windows:
gradlew build
On Linux/macOS:
./gradlew build
The compiled JAR file will be located in build/libs/.
2026.5.23
2.0.0及以后的版本将不再兼容1.X.X的版本,此前已经存在的物品会失效,对配置文件没有影响
主要变化:
CommandItem2 是一款功能强大、高度可定制的 Minecraft 插件,专为 Paper 服务端设计。它允许服主创建拥有特殊能力的独特物品。这些物品可以执行指令、拥有冷却时间、需要特定权限等。所有特殊属性都通过持久化数据容器(PDC)直接存储在物品本身,确保物品在交易或存放后仍能保持其独特性。
strict 模式可以用于兼容旧版本或者由管理修改过的特殊物品,如果关闭该模式,请确保玩家没有权限修改物品NBT数据,否则可能造成严重后果
| 指令 | 描述 | 权限 |
|---|---|---|
/si reload |
重载插件的配置文件。 | commanditem.admin |
/si get <id> [数量] |
给予玩家一个指定的特殊物品。 | commanditem.admin |
/si |
显示帮助信息。 | commanditem.admin |
玩家权限:
commanditem.use.<item_id>: 允许玩家使用对应ID的特殊物品。例如 commanditem.use.fire_sword。 commanditem.use.*: 允许玩家使用所有特殊物品。你可以在任何支持 PlaceholderAPI 的插件中使用这些变量。
| 变量 | 描述 | 输出示例 |
|---|---|---|
%commanditem_cooldown_<item_id>% |
显示一个物品格式化后的剩余冷却时间。 | 1m 15s / 可用 |
%commanditem_cooldown_s_<item_id>% |
显示剩余冷却时间的秒数。 | 75 / 0 |
%commanditem_name_<item_id>% |
显示物品经过 MiniMessage 格式化后的名称。 | 炼狱之刃 |
如果你想自己编译这个插件,请遵循以下步骤:
克隆仓库:
git clone <repository_url>
cd CommandItem2
确保你已安装 JDK 17 或更高版本。
使用 Gradle 构建 JAR 文件:
Windows 系统:gradlew build
Linux/macOS 系统:./gradlew build
编译好的 JAR 文件将会位于 build/libs/ 目录下。