Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Command Actions

Command Actions

Allows mcfunction files to be executed on various events

768
5
Library
Utility

Compatibility

Minecraft: Java Edition

1.19.2

Platforms

Quilt

Supported environments

Server-side

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source

Creators

sschr15
sschr15 Owner

Details

Licensed MIT
Created 2 years ago
Updated 2 years ago
DescriptionGalleryChangelogVersions

Created for ModFest: Singularity

Command Actions provides an interface to automatically run .mcfunction files at particular events. They are loaded from the filesystem on every event call, ensuring that they are as up to date as they can be.

How to run functions?

  • Open / create the .minecraft/config/command-actions/functions folder
  • Add function files or folders containing function files with the proper event names
    • Functions are detected either without an extension or with the .mcfunction extension.
    • All files in subdirectories are detected regardless of extension (or lack thereof)
    • Subdirectories are recursed to find functions

Current capabilities

Some preprocessing occurs on the input. All preprocessing directives are preceded with a hash (#), and any line preceded with a hash that is not a preprocessor is marked as a comment.

Preprocessing directives:

  • if, elif, else, endif - check if a given macro evaluates to true or 1, if a number is nonzero, if an equation results in a nonzero answer, or if two values are equal or unequal
  • define - define a replacement to be replaced later. Not recursive
  • undef - remove the definition of an already defined macro. This also works for system-provided macros.

Current events

Built-in macros are listed, and all builtins (including those provided by other mods) are preceded with C_

  • server-ready - called after the server reports it's ready for players
    • serverName
    • isSinglePlayer
    • online
    • motd
  • player-join - called when a player is placed into the server
    • All macros provided by server-ready
    • playerName and player as shorthand
    • playerUUID
    • auth
    • firstJoin

Modrinth is open source.

feat/theseus/tauri-v2@c5403db

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.