Commands
Every TMA command needs permission level 2, the level of /give and /item. Operators, functions and command blocks have it.
Optional arguments are a keyword followed by a value, like duration 600 or viewers @a, and go in any order after the required ones.
| Command | What it does |
|---|---|
/tma with <targets> <command> | runs a command with ${…} filled in from each target's variables |
/tma powerinv … | reads and writes origins:inventory power slots |
/tma fakeentity … | spawns, lists and removes fake entities only chosen players can see |
/tma disguise …, /tma undisguise … | makes entities look like another entity type |
/tma global … | looks at and changes the global store |
/tma fakeblock … | shows chosen players a different block at a position |
/tma chunkload … | keeps the chunks around an entity loaded, following it |
/tma tickrate <targets> … | slows, freezes or speeds up entities |
/tma keys watch|stop | shows a player's held keybinds and key sequence progress live |
/tma obfuscate …, /tma unobfuscate … | shows players' names as magic text to chosen viewers |
/tma tablist hide|show … | leaves players out of chosen viewers' tab list |
/tma powertag … | shows which powers a tag covers |
/disableshield <targets> <ticks> | knocks down a raised shield and puts it on cooldown |
/tmavc … | voice chat: broadcast, forced mute, forced deafen |
TMA's attributes are read with vanilla's /attribute. TMA's gamerules are set with vanilla's /gamerule.
/tma with
tma with <targets> <command>For each target, fills in every ${expression} in <command> from that target's variables and lists, then runs the command as that target, like execute as. Position, dimension and permission level stay those of whoever ran it.
| Argument | |
|---|---|
<targets> | any entity selector. Each target runs the command once |
<command> | the rest of the line: any command, without the leading / |
- Result: the sum of the commands' results.
- Fails, and runs nothing, if any target's placeholders can't be filled in. The error says which target and why.
- Placeholders always become text.
$${is a literal${.
tma with @a title @s actionbar {"text":"${coins} coins"}
tma with @s scoreboard players set @s level ${(int) (xp / 100)}Full details are on page 9.
/tma powerinv
tma powerinv get <target> <power> <slot>
tma powerinv id <target> <power> <slot>
tma powerinv set <target> <power> <slot> <item> [count]
tma powerinv clear <target> <power> [slot]
tma powerinv copy <from> <to>
tma powerinv move <from> <to><from>/<to> are power <target> <power> <slot> or entity <target> <slot>. Slots in a power are container.0, container.1, and so on.
| Subcommand | Result |
|---|---|
get | the item count in the slot |
id | prints the item id as plain text (minecraft:spruce_log) and returns its registry number |
set | the count set |
clear | items removed from one slot, or stacks removed from the whole power |
copy | the count copied (overwrites the destination) |
move | the count moved (only into an empty destination) |
Full details and examples are on page 14.
/tma fakeentity
tma fakeentity spawn <owner> <entity_type> <pos> <lifetime> [behavior <behavior>] [viewers <viewers>] [id <id>]
tma fakeentity player <owner> <username> <pos> <lifetime> [behavior <behavior>] [viewers <viewers>] [id <id>]
tma fakeentity remove <id>
tma fakeentity run <id> <command>
tma fakeentity remove-all <owner>
tma fakeentity listSpawns and removes fake entities, the same as the spawn_fake_entity and despawn_fake_entity actions. player spawns a fake player that looks like the player with that username.
| Argument | |
|---|---|
<owner> | one entity: the fake entity's spawner. It spawns in this entity's dimension, facing the way it faces. |
<entity_type> | what it looks like, like minecraft:zombie. Any summonable type |
<username> | (player) the player the fake player looks like |
<pos> | where it spawns. ~ ~ ~ is where the command runs |
<lifetime> | ticks until it disappears, at least 1 |
behavior <behavior> | hostile, neutral, passive or stationary: its behavior. Default neutral for spawn and stationary for player |
viewers <viewers> | players who can see it. Left out: every player nearby. |
id <id> | a whole number, 1 or more, to remove it by later. Left out: the next free id is assigned. Unique across the server: reusing a live id replaces that fake entity. |
| Subcommand | Result |
|---|---|
remove <id> | 1 if a fake entity had that id, and 0 if none did. Suggests the ids of live fake entities. |
run <id> <command> | runs <command> as the fake entity, at its position, facing and dimension, so @s is the fake entity. Returns the command's result, and fails for a missing fake entity. See what works on a fake entity. |
remove-all <owner> | how many of that entity's fake entities went |
list | every live fake entity with its id, type, position, ticks left and viewer count. Returns how many |
viewersis decided once, when the command runs, likeviewer_conditionwithrecheck: false. Players who join later can't see it.- With
viewers, the fake entity depends on its owner. Once the owner has left or unloaded, no new viewers get it. - Result:
spawnandplayerreturn the fake entity's id, and their feedback says it (Spawned fake entity 3: …). Store it withexecute store resultto remove that fake entity later. They fail for types that can't be summoned. - Assigned ids are the lowest one no live fake entity has, so ids freed by despawning are used again. A pack's own id can collide with an assigned one and replace that fake entity.
- No NBT here. To equip a fake entity from a command, spawn it and then use
tma fakeentity run <id> item replace entity @s armor.head with minecraft:golden_helmet. - For a fake player use
player. Players aren't a summonable type, sospawn minecraft:playerfails.
execute store result score @s stalker run tma fakeentity spawn @s minecraft:zombie ^ ^ ^8 200 behavior hostile viewers @s
tma fakeentity player @s Notch ~ ~ ~2 400 id 50 viewers @s
tma fakeentity run 50 effect give @s minecraft:glowing 5
tma fakeentity remove 50
tma fakeentity listThe first spawns a zombie 8 blocks in front of you that only you can see and that hunts you for 10 seconds, and keeps its id in your stalker score. The second picks id 50 itself.
To remove a fake entity by the id in a score, fill it in with /tma with:
tma with @s tma fakeentity remove ${Scoreboard.get("stalker")}/tma disguise
tma disguise <targets> <entity_type> [duration <ticks>] [viewers <viewers>]
tma undisguise <targets>Disguises entities as another entity type, or removes the disguise, the same as the disguise and undisguise actions.
| Argument | |
|---|---|
<targets> | entities to disguise or undisguise |
<entity_type> | what they look like. Any summonable type except players |
duration <ticks> | ticks until it ends. Left out or 0 lasts until undisguise |
viewers <viewers> | players who see the disguise. Everyone else sees the real entity. Left out: everyone. |
viewersis decided once, when the command runs, likeviewer_conditionwithrecheck: false.- Disguising an entity that's already disguised replaces the disguise.
- Result:
disguisereturns the number of targets.undisguisereturns how many were disguised.disguisefails for players and types that can't be summoned.
tma disguise @s minecraft:creeper duration 600
tma disguise @e[type=pig,distance=..10] minecraft:ghast viewers @a[team=red]
tma undisguise @a/tma global
tma global get <key>
tma global set <key> <value>
tma global delete <key>
tma global list [<prefix>]
tma global prune <prefix>
tma global prune --older-than <ticks>
tma global lock <key> <owner>
tma global unlock <key>Looks at and changes the global store. Commands ignore locks. A key or prefix without a namespace gets too-many-attributes:.
| Subcommand | Result |
|---|---|
get | prints the value. Returns it if it's a whole number, 1/0 for a boolean, the size of a list, and 1 for anything else |
set | sets or creates the key from a Java literal (5, 2.5, true, "text"). Returns the new value if it's a number, and 1 for anything else |
delete | removes the key. Fails for a missing key |
list | prints every key (or those starting with <prefix>) with type, value, age, lock owner and bound entities. Returns how many |
prune <prefix> | deletes every key starting with the prefix. Returns how many |
prune --older-than <ticks> | deletes every key last written at least that many ticks ago. Returns how many |
lock / unlock | locks the key to an owner (a namespace or power id), or removes the lock |
tma global set mypack:gate_open true
tma global list mypack:bond/
execute store result score #kills stats run tma global get mypack:zombie_killsFull details are on page 12.
/tma fakeblock
tma fakeblock set <pos> <block> <viewers> [duration <ticks>]
tma fakeblock fill <from> <to> <block> <viewers> [duration <ticks>]
tma fakeblock clear <pos> [<to>]Shows the chosen players a different block at <pos>, or at every block in the box from <from> to <to> like /fill. The real block stays as it is. See fake blocks for how players interact with one.
| Argument | |
|---|---|
<pos> | the block position. Its chunk must be loaded |
<from>, <to> | fill, and clear with <to>: two corners of a box, both included. At most 32,768 blocks, the same as /fill. Blocks in unloaded chunks are skipped |
<block> | what those players see, like minecraft:stone or minecraft:oak_stairs[facing=north] |
<viewers> | the players who see it. Fixed when the command runs, so they still see it after relogging. |
duration <ticks> | ticks until it goes away. Left out or 0 lasts until it's cleared or the real block changes |
- Result:
setreturns how many players it was shown to.fillreturns how many fake blocks it placed.clearreturns how many fake blocks it removed. - Setting one where a fake block already is replaces it.
- Fake blocks end when the server restarts.
tma fakeblock set ~ ~ ~2 minecraft:bedrock @a[team=red] duration 400
tma fakeblock fill ~-5 ~ ~-5 ~5 ~3 ~5 minecraft:glass @s duration 200
tma fakeblock clear 100 64 -20
tma fakeblock clear ~-5 ~ ~-5 ~5 ~3 ~5For spheres, cylinders and hollow shapes, use the zone action.
/tma chunkload
tma chunkload start <targets> [radius <radius>] [duration <ticks>]
tma chunkload stop <targets>
tma chunkload listTies /forceload-style loading to entities, so it follows them. start is the load_chunks action and stop is stop_loading_chunks. See chunk loading for what's loaded and when it ends.
| Argument | |
|---|---|
<targets> | the entities to load around |
radius <radius> | chunks out from each target's chunk. Default 1 (3×3). 0 is its own chunk. |
duration <ticks> | ticks until it stops. Left out or 0 lasts until stop, or until the entity dies |
- Result:
startreturns how many entities it started on.stopreturns how many had a tie to stop.listreturns how many entities are loading chunks, and prints each one's chunk, dimension, chunk count and ties. - It's the same tie as the action.
startreplaces an existing tie, andstopalso ends one the action started. Achunk_loaderpower keeps going. - The ties end when the server restarts.
tma chunkload start @e[type=minecraft:villager,tag=courier]
tma chunkload start @s radius 2 duration 12000
tma chunkload stop @e[tag=courier]/tma tickrate
tma tickrate <targets> rate <rate> [duration <ticks>]
tma tickrate <targets> freeze [duration <ticks>]
tma tickrate <targets> unfreeze
tma tickrate <targets> step <ticks>
tma tickrate <targets> sprint <ticks>
tma tickrate <targets> reset
tma tickrate <targets> queryChanges how fast entities run. It works like the set_tick_rate action, which explains what slows down.
| Subcommand | |
|---|---|
rate <rate> | ticks per second. 20 is normal, 0 stops, up to 100. Players stop at 20 |
freeze | stops the targets until unfreeze |
unfreeze | back to their rate |
step <ticks> | frozen targets run this many ticks, then stop again |
sprint <ticks> | targets run at normal speed for this many ticks, then go back |
reset | back to normal |
query | prints the first target's settings |
duration <ticks> | with rate or freeze: ticks until the targets go back to normal. Left out or 0 lasts until reset |
- Result: the number of targets.
queryreturns the first target's rate, or0when it's frozen. unfreeze,stepandsprintkeep any runningduration.
tma tickrate @e[type=zombie,distance=..10] rate 5 duration 200
tma tickrate @p freeze
tma tickrate @p step 20
tma tickrate @e[type=chicken] rate 60
tma tickrate @e reset/tma keys
tma keys watch [<player>]
tma keys stopShows you live, in your action bar, the keybinds the server has for a player (you when left out), and how far each of their action_on_key_sequence powers has got, like combo_dash 1/2. Use it to check that a key reaches the server, or why a sequence doesn't finish.
stopends it. It also ends when you log out.- A sequence shows
hold <ticks>while a hold step is counting down, and(cooldown)while it can't run.
tma keys watch
tma keys watch Steve
tma keys stop/tma obfuscate
tma obfuscate <targets> [duration <ticks>] [viewers <viewers>]
tma unobfuscate <targets>Shows the targets' names (and Styled Nicknames nicknames) as magic text. See name obfuscation for where it applies and what stays visible.
| Argument | |
|---|---|
<targets> | the players whose names are scrambled |
duration <ticks> | ticks until it ends. Left out or 0 lasts until unobfuscate |
viewers <viewers> | who sees them scrambled. Fixed when the command runs, so they still see it after relogging. Left out: every other player. |
- Result:
obfuscatereturns how many players it applied to.unobfuscatereturns how many had one to end. - Running it again on a player replaces the earlier one. An
obfuscate_namepower keeps going afterunobfuscate. - It ends when the server restarts.
tma obfuscate @a[team=spies]
tma obfuscate @s duration 1200 viewers @a[team=red]
tma unobfuscate @a/tma tablist
tma tablist hide <targets> [duration <ticks>] [viewers <viewers>]
tma tablist show <targets>Leaves the targets out of the tab list. It's the same tie as the hide_from_tablist and show_in_tablist actions. See tab list hiding.
| Argument | |
|---|---|
<targets> | the players to leave out |
duration <ticks> | ticks until they're shown again. Left out or 0 lasts until show |
viewers <viewers> | whose tab list they're left out of. Fixed when the command runs. Left out: every other player. |
- Result:
hidereturns how many players it applied to.showreturns how many had one to end. Ahidden_from_tablistpower keeps going. - It ends when the server restarts.
tma tablist hide @s
tma tablist hide @a[tag=staff] viewers @a[tag=!staff]
tma tablist show @a/tma powertag
tma powertag list
tma powertag list <tag>
tma powertag of <power>Shows what the power tag files resolved to after loading: every tag with how many powers it covers, the powers in one tag, or the tags on one power. Returns the number printed. Write tag names in full (mypack:magic).
tma powertag list mypack:magic
tma powertag of origins:phantomize/disableshield
disableshield <targets> <ticks>For each target player who is blocking with a shield right now: lowers the shield, puts shields on cooldown for <ticks>, and plays the shield-break effect. It only affects players who are blocking, which suits an ability like a shield bash.
| Argument | |
|---|---|
<targets> | players |
<ticks> | cooldown length, at least 1 |
- Result: how many targets were affected.
Example: a shield-breaking hit, from a power:
{
"type": "origins:action_on_hit",
"bientity_action": {
"type": "origins:target_action",
"action": {
"type": "origins:execute_command",
"command": "disableshield @s 100"
}
}
}When you hit a player who is blocking, their shield goes down and can't be raised for 5 seconds.
/tmavc
Voice chat controls. They need Simple Voice Chat to have an effect.
tmavc broadcast start [<listeners>]
tmavc broadcast stop
tmavc mute start <targets>
tmavc mute stop <targets>
tmavc deafen start <targets>
tmavc deafen stop <targets>| Subcommand | What it does |
|---|---|
broadcast start | You (the player running the command) broadcast your voice to every online player, or only to <listeners> if given, until broadcast stop. |
broadcast stop | Ends your broadcast |
mute start / stop | Force-mutes the targets, so their microphone audio reaches nobody. |
deafen start / stop | Force-deafens the targets, so they hear no voice audio. |
broadcastmust be run by a player.- Result:
broadcastreturns 1.muteanddeafenreturn the number of targets. - It all ends when the server restarts.
Details, and the matching power actions and conditions, are on page 13.
Gamerules
| Gamerule | Default | What it does |
|---|---|---|
tmaPlayerExpiryDays | 30 | Real days a player can be offline before TMA forgets their tracked values and releases global keys bound to them. 0 never forgets. See page 1 and page 12. |
whitelistFeedback | empty | Only the listed players get command feedback. |
whitelistFeedback
gamerule whitelistFeedback <username> [<username> …]
gamerule whitelistFeedback none
gamerule whitelistFeedbackA space-separated list of usernames. While it has any names, only those players are sent command feedback. none empties it and restores vanilla behavior. With no value, /gamerule shows the list.
"Command feedback" is what vanilla's sendCommandFeedback gamerule covers:
- the message a player gets from their own command, like
Set the time to 1000 - the gray, italic
[Steve: Set the time to 1000]copy sent to other operators, including the ones from command blocks whencommandBlockOutputis on
Unchanged:
- Error messages (red) go to whoever ran the command, as with
sendCommandFeedback. - With
sendCommandFeedback false, nobody gets feedback. This gamerule only narrows who gets it. - The server console and log get everything.
- Output a command sends on purpose, like
/tell,/say,/tellrawor/title, reaches its targets as usual. - Result: setting it returns how many names are on the list.
- Names are usernames and ignore case. An offline name stays on the list and applies when they join.
- It's saved with the world, like any gamerule.
- Careful: setting it without your own name stops your own feedback, starting with the confirmation of that
/gamerulecommand.
gamerule whitelistFeedback Notch jeb_
gamerule whitelistFeedback none