{"id":52106,"date":"2026-06-02T23:36:16","date_gmt":"2026-06-02T20:36:16","guid":{"rendered":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/"},"modified":"2026-06-02T23:36:16","modified_gmt":"2026-06-02T20:36:16","slug":"ctjs","status":"publish","type":"mod","link":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/","title":{"rendered":"ctjs"},"content":{"rendered":"<p># NOTE<br \/>\nThis project is a fork from the original mod, for the original github you can head over to https:\/\/github.com\/ChatTriggers\/ctjs<\/p>\n<div style=\"text-align:center;\">\n<p>      <img decoding=\"async\" src=\"https:\/\/chattriggers.com\/assets\/images\/logo-final.png\" width=\"546\" alt=\"ChatTriggers.js\" \/><\/p>\n<p>      <img decoding=\"async\" src=\"https:\/\/discordapp.com\/api\/guilds\/119493402902528000\/embed.png\" alt=\"Discord\" \/><\/p>\n<p>      <img decoding=\"async\" src=\"https:\/\/img.shields.io\/github\/v\/release\/Synnerz\/ctjs.svg?include_prereleases\" alt=\"Releases\" \/><\/p>\n<p>      <img decoding=\"async\" src=\"https:\/\/github.com\/Synnerz\/ctjs\/actions\/workflows\/build.yml\/badge.svg\" alt=\"Build Status\" \/><\/p>\n<\/div>\n<p>ChatTriggers (CT) is a framework for Minecraft that enables live scripting and client modification using JavaScript. We provide libraries, wrappers, objects, and more to make your life as a modder as easy as possible. Even if we don&#8217;t support something you need, you can still access any Java classes and native fields\/methods.<\/p>\n<p>With CT, you have all the power of a modding environment with the benefit of an easy-to-use language and the ability to reload your scripts without restarting the game. CT also provides a way to define your own Mixins!<\/p>\n<p>CT is currently written for Fabric 1.21.x. See this repo for the deprecated Forge 1.8.9 version.<\/p>\n<p>### Examples<\/p>\n<p>Want to hide an annoying server message that you see every time you join a world?<\/p>\n<p>&#8220;`js<br \/>\nregister(&#8216;chat&#8217;, event => {<br \/>\n    cancel(event);<br \/>\n}).setCriteria(&#8220;Check out our store at www.some-mc-server.com for 50% off!&#8221;);<br \/>\n&#8220;`<\/p>\n<p>How about automating a series of common commands into one?<\/p>\n<p>&#8220;`js<br \/>\nregister(&#8216;command&#8217;, () => {<br \/>\n    ChatLib.command(&#8216;command1&#8217;);<br \/>\n    ChatLib.command(&#8216;command2&#8217;);<br \/>\n    ChatLib.command(&#8216;command3&#8217;);<br \/>\n}).setName(&#8216;commandgroup&#8217;);<br \/>\n&#8220;`<\/p>\n<p>Or even something silly like a calculator command<\/p>\n<p>&#8220;`js<br \/>\nregister(&#8216;command&#8217;, (&#8230;args) => {<br \/>\n    \/\/ Evaluate all args the user gives us&#8230;<br \/>\n    const result = new Function(&#8216;return &#8216; + args.join(&#8216; &#8216;))();<\/p>\n<p>    \/\/ &#8230;and show the result is a nice green color<br \/>\n    ChatLib.chat(`&#038;aResult: ${result}`);<br \/>\n}).command(&#8216;calc&#8217;);<br \/>\n&#8220;`<\/p>\n<p>With CT&#8217;s register system, you can listen to custom events that we emit and react to them. For example, we emit events when you switch worlds, click on a GUI, hit a block, hover over an item and see its tooltip, and much more! You can even provide custom events for other module authors to use.<\/p>\n<p>### Getting Started<\/p>\n<p>To begin, download and install Fabric for one of the supported versions, then head over to our releases page and download the latest version. The mod is installed like any mod; just drag it into your mods folder. Once installed, you can import modules in-game by typing `\/ct import <moduleName>`, where `<moduleName>` is the name of the module. You can browse the available modules on our website.<\/p>\n<p>### Writing Modules<\/p>\n<p>If you can&#8217;t find any modules on the website that do exactly what you want, which is quite likely, you&#8217;ll have you write your own! Here are the steps you&#8217;ll want to take:<\/p>\n<p>1. Navigate to the `.minecraft\/config\/ChatTriggers\/modules` folder. If you don&#8217;t know where this is, you can also execute `\/ct files`, which will open the correct directory automatically.<br \/>\n1. Create a new directory with the name of your module<br \/>\n1. Inside the directory, create a file called `metadata.json`, and inside of that, put the following text:<br \/>\n    &#8220;`json<br \/>\n    {<br \/>\n        &#8220;name&#8221;: &#8220;<module name>&#8220;,<br \/>\n        &#8220;entry&#8221;: &#8220;index.js&#8221;<br \/>\n    }<br \/>\n    &#8220;`<br \/>\n    This means that when our module first runs, CT will run the `index.js` file<\/p>\n<p>    _Note that `<module name>` must match the name of your folder exactly!_<br \/>\n1. Create the `index.js` file, and put some code in there. What exactly you write will depend on what you want CT to do. To learn more about the available APIs, take a look at the Slate.<br \/>\n    * Some things on the Slate may be outdated, we are working on improving this<\/p>\n<p>### Documentation<\/p>\n<p>&#8211; Slate, a guided tutorial that covers the basics<br \/>\n&#8211; Javadocs, a technical reference for all public APIs in the mod<br \/>\n&#8211; [MIGRATION.md](docs\/MIGRATION.md), a guide for upgrading modules from CT 2.X to 3.0<br \/>\n&#8211; [CONTRIBUTING.md](CONTRIBUTING.md) (TODO)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>An in-progress rewrite of the ChatTriggers mod in Fabric 1.21<\/p>\n","protected":false},"featured_media":52107,"template":"","meta":{"_minecraft_slug":"ctjs","_minecraft_project_id":"wuC17qUL","_minecraft_author":"DocilElm","_minecraft_license":"MIT","_minecraft_downloads":18333,"_minecraft_follows":9,"_minecraft_client_side":"required","_minecraft_server_side":"unsupported","_minecraft_storage_type":"zip","_minecraft_archive_name":"ctjs.zip","_minecraft_size_bytes":198973460,"_minecraft_version_count":23,"_minecraft_updated_at":"2026-05-17T00:41:20.205294Z","_minecraft_date_created":"2025-10-14T20:07:25.290408Z","_minecraft_date_modified":"2026-05-02T21:52:50.801225Z","_minecraft_project_url":"https:\/\/modrinth.com\/mod\/ctjs","_minecraft_icon_attachment_id":52107,"_minecraft_imported_at":"2026-06-02T20:36:19+00:00","_minecraft_import_hash":"a107fadd7669cfcb2cbb079d96bd0503","_minecraft_versions":"","_minecraft_links":"","_minecraft_gallery":"","_minecraft_api_metadata":""},"mod_category":[97,104],"mod_loader":[99,106],"minecraft_version":[40,41,38,78,79,80,81,82,31],"class_list":["post-52106","mod","type-mod","status-publish","has-post-thumbnail","hentry","mod_category-fabric","mod_category-forge","mod_loader-fabric","mod_loader-forge","minecraft_version-1-21-10","minecraft_version-1-21-11","minecraft_version-1-21-4","minecraft_version-1-21-5","minecraft_version-1-21-6","minecraft_version-1-21-7","minecraft_version-1-21-8","minecraft_version-1-21-9","minecraft_version-1-8-9"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>ctjs - Minecraft<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ctjs - Minecraft\" \/>\n<meta property=\"og:description\" content=\"An in-progress rewrite of the ChatTriggers mod in Fabric 1.21\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/\" \/>\n<meta property=\"og:site_name\" content=\"Minecraft\" \/>\n<meta property=\"og:image\" content=\"https:\/\/chattriggers.com\/assets\/images\/logo-final.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/\",\"name\":\"ctjs - Minecraft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/ctjs-icon-11faad6fa7a6e34547b4ea22763258a326fbb312.png\",\"datePublished\":\"2026-06-02T20:36:16+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/#primaryimage\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/ctjs-icon-11faad6fa7a6e34547b4ea22763258a326fbb312.png\",\"contentUrl\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/ctjs-icon-11faad6fa7a6e34547b4ea22763258a326fbb312.png\",\"width\":128,\"height\":128},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/ctjs\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Mods\",\"item\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/mods\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"ctjs\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/#website\",\"url\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/\",\"name\":\"Minecraft\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/vpesports.com\\\/minecraft\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ctjs - Minecraft","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/","og_locale":"en_US","og_type":"article","og_title":"ctjs - Minecraft","og_description":"An in-progress rewrite of the ChatTriggers mod in Fabric 1.21","og_url":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/","og_site_name":"Minecraft","og_image":[{"url":"https:\/\/chattriggers.com\/assets\/images\/logo-final.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/","url":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/","name":"ctjs - Minecraft","isPartOf":{"@id":"https:\/\/vpesports.com\/minecraft\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/#primaryimage"},"image":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/#primaryimage"},"thumbnailUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/ctjs-icon-11faad6fa7a6e34547b4ea22763258a326fbb312.png","datePublished":"2026-06-02T20:36:16+00:00","breadcrumb":{"@id":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/#primaryimage","url":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/ctjs-icon-11faad6fa7a6e34547b4ea22763258a326fbb312.png","contentUrl":"https:\/\/vpesports.com\/minecraft\/wp-content\/uploads\/2026\/06\/ctjs-icon-11faad6fa7a6e34547b4ea22763258a326fbb312.png","width":128,"height":128},{"@type":"BreadcrumbList","@id":"https:\/\/vpesports.com\/minecraft\/mods\/ctjs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vpesports.com\/minecraft\/"},{"@type":"ListItem","position":2,"name":"Mods","item":"https:\/\/vpesports.com\/minecraft\/mods\/"},{"@type":"ListItem","position":3,"name":"ctjs"}]},{"@type":"WebSite","@id":"https:\/\/vpesports.com\/minecraft\/#website","url":"https:\/\/vpesports.com\/minecraft\/","name":"Minecraft","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vpesports.com\/minecraft\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod\/52106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod"}],"about":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/types\/mod"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media\/52107"}],"wp:attachment":[{"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/media?parent=52106"}],"wp:term":[{"taxonomy":"mod_category","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_category?post=52106"},{"taxonomy":"mod_loader","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/mod_loader?post=52106"},{"taxonomy":"minecraft_version","embeddable":true,"href":"https:\/\/vpesports.com\/minecraft\/wp-json\/wp\/v2\/minecraft_version?post=52106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}