Command API
getItem
Section titled “getItem”/getItem <item> <count> nbtCommand rule:
commandGetItemmust allow the command source to use/getItem.
Field notes:
item: Minecraft item argument, for exampleminecraft:stone.count: requested item count. Must be an integer greater than or equal to1.nbt: enables machine-readable command output.
Behavior notes:
- The command runs the item fetch in the background and sends the final result when it is done.
getItemMaxCountlimitscountwhen it is greater than0.- Rate limit behavior still follows
getItemCooldownSecondsand is matched by the command source player name.
getItem NBT result
Section titled “getItem NBT result”Success output is an NBT list. Each entry describes one item stack fetched by one bot.
Example:
[ { name: "bot_getitem_1", id: "minecraft:stone", count: 64 }]Field notes:
name: bot name.id: item registry id.count: item count fetched by this bot.
If no item is fetched, the result is an empty list:
[]getItem NBT error
Section titled “getItem NBT error”When count is invalid or exceeds getItemMaxCount, NBT mode sends a failure response with the configured maximum:
{ maxCount: 256}Field notes:
maxCount: value of thegetItemMaxCountrule.0means unlimited.
Other runtime failures still use the normal command failure text:
- The message is localized using the server language.
[Carpet LMS Addition] Unknown erroror
[Carpet LMS Addition] 未知错误When getItemCooldownSeconds rate-limits NBT mode, the command sends a failure response with the remaining wait time:
{ waitSecond: 5}getStorageData
Section titled “getStorageData”/getStorageData/getStorageData <id>Command rule:
commandGetStorageDatamust allow the command source to use/getStorageData.
Field notes:
id: Minecraft item argument, for exampleminecraft:diamond.
Behavior notes:
- The command scans all configured storage files and merges matching item counts across them.
- Shulker box contents follow the same recursive counting behavior as the storage website data.
- Invalid configured storage entries are logged and skipped by the existing storage scanner.
- Rate limit behavior follows
getStorageDataCooldownSecondsand is matched by the command source player name.
getStorageData NBT result
Section titled “getStorageData NBT result”/getStorageData sends an NBT list. Each entry describes the cumulative count of one item across all configured storage files.
Example:
[ { id: "minecraft:diamond", count: 100 }]/getStorageData <id> sends one NBT compound for the requested item:
{ id: "minecraft:diamond", count: 100}When getStorageDataCooldownSeconds rate-limits the command, it sends a failure response with the remaining wait time:
{ waitSecond: 5}Field notes:
id: item registry id.count: cumulative item count across all configured storage files. If the requested item exists but is not present in storage, the single-item result uses0.