You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marker Command Engine is a lightweight command execution engine for Minecraft datapacks. It runs commands stored in NBT storage using a marker entity + command block technique, with full LanternLoad integration for reliable load ordering.
Features
Execute commands stored in storage mce:cmd
No macros required — compatible with Minecraft 1.19.3+
Low performance impact
Clean public API (mce:api/*) — internal functions are private
# Tag the target entity firsttag@a[name=Steve,limit=1]addmce.executor# Set the command and calldatamodifystoragemce:cmdCommandsetvalue"execute as @a[tag=mce.executor] run say I am Steve!"functionmce:api/run/as# mce.executor tag is removed automatically
Run at Coordinates
# Execute a command from a fixed world positiondatamodifystoragemce:cmdCommandsetvalue"say Hello from coords!"datamodifystoragemce:cmdAtXsetvalue0datamodifystoragemce:cmdAtYsetvalue64datamodifystoragemce:cmdAtZsetvalue0functionmce:api/run/at
All three coordinates (AtX, AtY, AtZ) must be set before calling. Values are integers.
# Set a 5-second (100 tick) cooldown on @sdatamodifystoragemce:cdTickssetvalue100functionmce:api/cooldown/set# Check before running a command (requires 1.20.2+)executeas@siffunctionmce:api/cooldown/checkrunfunctionns:your/action# Get remaining ticksexecuteas@srunfunctionmce:api/cooldown/get# Result -> mce:output Cooldown.remaining# Clear cooldown immediatelyfunctionmce:api/cooldown/clear
Announce
# Send title, subtitle, and/or actionbar in a single call.# All three keys are optional — omit any to skip that slot.datamodifystoragemce:announceTitlesetvalue"Welcome!"datamodifystoragemce:announceSubtitlesetvalue"Enjoy your stay."datamodifystoragemce:announceActionbarsetvalue"Server online"functionmce:api/util/announce
With custom timing (call before announce):
# Presets: fast (5/30/5), normal (10/70/20), slow (20/100/20), instant (0/40/0)datamodifystoragemce:announce_timesPresetsetvalue"fast"functionmce:api/util/announce_timesdatamodifystoragemce:announceTitlesetvalue"Go!"functionmce:api/util/announce
Log
# Write an entry using level shorthands (recommended)datamodifystoragemce:log_writemsgsetvalue"Player joined the arena."functionmce:api/log/info# severity 0 — whitedatamodifystoragemce:log_writemsgsetvalue"Cooldown nearly expired."functionmce:api/log/warn# severity 1 — yellowdatamodifystoragemce:log_writemsgsetvalue"Command failed."functionmce:api/log/error# severity 2 — red# Or set lvl manually and call writedatamodifystoragemce:log_writemsgsetvalue"Custom entry."datamodifystoragemce:log_writelvlsetvalue1functionmce:api/log/write# Show all entries to @s (colored by level)functionmce:api/log/show# Clear all entriesfunctionmce:api/log/clear
The log holds the last 64 entries. Older entries are dropped automatically.
Each entry is stored as {n: <int>, lvl: <0|1|2>, msg: "<string>"}.
Version
# Prints version to chat and writes to storage.functionmce:api/util/version# mce:output Version.string -> "2.2.0"# mce:output Version.numeric -> 2002000
Help
functionmce:api/util/help
Public API
Only mce:api/* functions are part of the public API. All mce:core/* functions are private and may change without notice.
mce:api/run/
Function
Description
mce:api/run/cmd
Execute command from mce:cmd Command immediately
mce:api/run/as
Execute as tagged entities (mce.executor tag + mce:cmd Command)
mce:api/run/at
Execute command from fixed coordinates (mce:cmd AtX/AtY/AtZ)
mce:api/queue/
Function
Description
mce:api/queue/add
Add mce:cmd Command to queue
mce:api/queue/run
Start executing the queue (one command per 3 ticks)
mce:api/queue/clear
Clear queue without executing
mce:api/schedule/
Function
Description
mce:api/schedule/run
Schedule command after mce:cmd Delay ticks (minimum: 1)
mce:api/schedule/clear
Cancel all pending scheduled jobs
mce:api/batch/
Function
Description
mce:api/batch/run
Add mce:batch commands list to queue and run
mce:api/batch/clear
Clear batch staging area without queuing
mce:api/text/batch/
Function
Description
mce:api/text/batch/run
Send all entries in mce:text_batch entries (tellraw / title / actionbar)