Commands
Every OPP 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 |
|---|---|
/opp with <targets> <command> | runs a command with ${…} filled in from each target's variables |
/opp powerinv … | reads and writes origins:inventory power slots |
/opp fakeentity … | spawns, lists and removes fake entities only chosen players can see |
/opp disguise …, /opp undisguise … | makes entities look like another entity type |
/opp global … | looks at and changes the global store |
/opp fakeblock … | shows chosen players a different block at a position |
/opp chunkload … | keeps the chunks around an entity loaded, following it |
/opp obfuscate …, /opp unobfuscate … | shows players' names as magic text to chosen viewers |
/opp tablist hide|show … | leaves players out of chosen viewers' tab list |
/opp powertag … | shows which powers a tag covers |
/disableshield <targets> <ticks> | knocks down a raised shield and puts it on cooldown |
/oppvc … | voice chat: broadcast, forced mute, forced deafen |
OPP's attributes are read with vanilla's /attribute. OPP's gamerules are set with vanilla's /gamerule.
/opp with
opp 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${.
opp with @a title @s actionbar {"text":"${coins} coins"}
opp with @s scoreboard players set @s level ${(int) (xp / 100)}Full details are on page 9.
/opp powerinv
opp powerinv get <target> <power> <slot>
opp powerinv id <target> <power> <slot>
opp powerinv set <target> <power> <slot> <item> [count]
opp powerinv clear <target> <power> [slot]
opp powerinv copy <from> <to>
opp 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.
/opp fakeentity
opp fakeentity spawn <owner> <entity_type> <pos> <lifetime> [behavior <behavior>] [viewers <viewers>] [id <id>]
opp fakeentity player <owner> <username> <pos> <lifetime> [behavior <behavior>] [viewers <viewers>] [id <id>]
opp fakeentity remove <id>
opp fakeentity run <id> <command>
opp fakeentity remove-all <owner>
opp 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
opp 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 opp fakeentity spawn @s minecraft:zombie ^ ^ ^8 200 behavior hostile viewers @s
opp fakeentity player @s Notch ~ ~ ~2 400 id 50 viewers @s
opp fakeentity run 50 effect give @s minecraft:glowing 5
opp fakeentity remove 50
opp 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 /opp with:
opp with @s opp fakeentity remove ${Scoreboard.get("stalker")}/opp disguise
opp disguise <targets> <entity_type> [duration <ticks>] [viewers <viewers>]
opp 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.
opp disguise @s minecraft:creeper duration 600
opp disguise @e[type=pig,distance=..10] minecraft:ghast viewers @a[team=red]
opp undisguise @a/opp global
opp global get <key>
opp global set <key> <value>
opp global delete <key>
opp global list [<prefix>]
opp global prune <prefix>
opp global prune --older-than <ticks>
opp global lock <key> <owner>
opp global unlock <key>Looks at and changes the global store. Commands ignore locks. A key or prefix without a namespace gets origins-powerful-powers:.
| 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 |
opp global set mypack:gate_open true
opp global list mypack:bond/
execute store result score #kills stats run opp global get mypack:zombie_killsFull details are on page 12.
/opp fakeblock
opp fakeblock set <pos> <block> <viewers> [duration <ticks>]
opp fakeblock clear <pos>Shows the chosen players a different block at <pos>. 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 |
<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.clearreturns 1 if a fake block was there, and 0 if none was. - Setting one where a fake block already is replaces it.
- Fake blocks end when the server restarts.
opp fakeblock set ~ ~ ~2 minecraft:bedrock @a[team=red] duration 400
opp fakeblock clear 100 64 -20/opp chunkload
opp chunkload start <targets> [radius <radius>] [duration <ticks>]
opp chunkload stop <targets>
opp 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.
opp chunkload start @e[type=minecraft:villager,tag=courier]
opp chunkload start @s radius 2 duration 12000
opp chunkload stop @e[tag=courier]/opp obfuscate
opp obfuscate <targets> [duration <ticks>] [viewers <viewers>]
opp 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.
opp obfuscate @a[team=spies]
opp obfuscate @s duration 1200 viewers @a[team=red]
opp unobfuscate @a/opp tablist
opp tablist hide <targets> [duration <ticks>] [viewers <viewers>]
opp 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.
opp tablist hide @s
opp tablist hide @a[tag=staff] viewers @a[tag=!staff]
opp tablist show @a/opp powertag
opp powertag list
opp powertag list <tag>
opp 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).
opp powertag list mypack:magic
opp 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.
/oppvc
Voice chat controls. They need Simple Voice Chat to have an effect.
oppvc broadcast start [<listeners>]
oppvc broadcast stop
oppvc mute start <targets>
oppvc mute stop <targets>
oppvc deafen start <targets>
oppvc 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 |
|---|---|---|
oppPlayerExpiryDays | 30 | Real days a player can be offline before OPP 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