All Mods Resource Packs Data Packs Shaders Modpacks Plugins
ctjs

ctjs

by Unknown • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

NOTE

This project is a fork from the original mod, for the original github you can head over to https://github.com/ChatTriggers/ctjs

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't support something you need, you can still access any Java classes and native fields/methods.

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!

CT is currently written for Fabric 1.21.x. See this repo for the deprecated Forge 1.8.9 version.

Examples

Want to hide an annoying server message that you see every time you join a world?

register('chat', event => {
    cancel(event);
}).setCriteria("Check out our store at www.some-mc-server.com for 50% off!");

How about automating a series of common commands into one?

register('command', () => {
    ChatLib.command('command1');
    ChatLib.command('command2');
    ChatLib.command('command3');
}).setName('commandgroup');

Or even something silly like a calculator command

register('command', (...args) => {
    // Evaluate all args the user gives us...
    const result = new Function('return ' + args.join(' '))();

    // ...and show the result is a nice green color
    ChatLib.chat(`&aResult: ${result}`);
}).command('calc');

With CT'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.

Getting Started

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.

Writing Modules

If you can't find any modules on the website that do exactly what you want, which is quite likely, you'll have you write your own! Here are the steps you'll want to take:

  1. Navigate to the .minecraft/config/ChatTriggers/modules folder. If you don't know where this is, you can also execute /ct files, which will open the correct directory automatically.

  2. Create a new directory with the name of your module

  3. Inside the directory, create a file called metadata.json, and inside of that, put the following text:

     {
         "name": "<module name>",
         "entry": "index.js"
     }

    This means that when our module first runs, CT will run the index.js file

    Note that <module name> must match the name of your folder exactly!

  4. 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.

    • Some things on the Slate may be outdated, we are working on improving this

Documentation

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
26.2
Fabric
3mo ago 1
26.1.x
Fabric
3mo ago 1
26.1.x
Fabric
3mo ago 1
1.21.11
Fabric
6mo ago 1
1.21.10
Fabric
last yr. 1
1.21.9
Fabric
last yr. 1
1.8.9
Forge
last yr. 1
1.21.4
Fabric
last yr. 1
1.21.10
Fabric
last yr. 1
1.21.9
Fabric
last yr. 1
1.21.8
Fabric
last yr. 1
1.21.7
Fabric
last yr. 1
1.21.6
Fabric
last yr. 1
1.21.5
Fabric
last yr. 1
1.21.10
Fabric
last yr. 1
1.21.9
Fabric
last yr. 1
1.21.8
Fabric
last yr. 1
1.21.7
Fabric
last yr. 1
1.21.6
Fabric
last yr. 1
1.21.5
Fabric
last yr. 1
1.21.10
Fabric
last yr. 1
1.21.9
Fabric
last yr. 1
1.21.8
Fabric
last yr. 1
1.21.7
Fabric
last yr. 1
1.21.6
Fabric
last yr. 1
1.21.5
Fabric
last yr. 1
[26.2v1] 26.2v1 by Unknown on Aug 09, 2026
Download
+ Added 26.2 support
+ some rendering things may be broken due to entirely new rendering system in this version
[26.1v2] 26.1v2 by Unknown on Aug 08, 2026
Download
+ Fixed register not working
+ Removed mappings from backend all together (hopefully no issues)
+ Access wideners were not fixed, maybe mixins work (?)
[26.1v1] 26.1v1 by Unknown on Aug 08, 2026
Download
added 26.1.x support

_some things might be broken idk i didnt test_
[1.21.11v1] 3.0.0-beta.34 by Unknown on May 02, 2026
Download
+ added support for 1.21.11 yarns mapping
+ mixins might not work as intended
[3.0.0-beta.32] 1.21.9v4 by Unknown on Oct 28, 2025
Download
TextComponent: fix weird font behavior (thanks @srockw for reporting)
[2.2.2-1.8.9] 2.2.2-1.8.9 by Unknown on Oct 26, 2025
Download
  • StepTrigger: avoid getting system time per trigger
  • JSContextFactory: remove debugger
  • JSContextFactory: rebuild ClassLoader on reload
  • ClassFilterTrigger: avoid crashing on class NPE
  • Removed force required Essential mod
  • Added configurations for a more customized AutoUpdater for modules
  • TextComponent: "fix" formatted links
  • IndySupport: fix asm exposed function lookup
[3.0.0-beta.31] 1.21.4v1 by Unknown on Oct 21, 2025
Download
  • Fixed Text scaling factor
  • Removed debugger for a performance enhancement
  • Fixed getOption method in extensions
  • Fixed class path too long error in Console
[3.0.0-beta.30] 1.21.10v3 by Unknown on Oct 18, 2025
Download
  • Text: fix getHeight scaling factor
[3.0.0-beta.29] 1.21.9v3 by Unknown on Oct 18, 2025
Download
  • Text: fix getHeight scaling factor
[3.0.0-beta.28] 1.21.8v3 by Unknown on Oct 18, 2025
Download
  • Text: fix getHeight scaling factor
[3.0.0-beta.27] 1.21.7v3 by Unknown on Oct 18, 2025
Download
  • Text: fix getHeight scaling factor
[3.0.0-beta.26] 1.21.6v3 by Unknown on Oct 18, 2025
Download
  • Text: fix getHeight scaling factor
[3.0.0-beta.25] 1.21.5v3 by Unknown on Oct 18, 2025
Download
  • Text: fix getHeight scaling factor
[3.0.0-beta.24] 1.21.10v2 by Unknown on Oct 16, 2025
Download
  • Fixed scaling factor in lower scales for Text object
  • Fixed crashing whenever attempting to enter /ct config
[3.0.0-beta.23] 1.21.9v2 by Unknown on Oct 16, 2025
Download
  • Fixed scaling factor in lower scales for Text object
  • Fixed crashing whenever attempting to enter /ct config
[3.0.0-beta.22] 1.21.8v2 by Unknown on Oct 16, 2025
Download
  • Fixed scaling factor in lower scales for Text object
[3.0.0-beta.21] 1.21.7v2 by Unknown on Oct 16, 2025
Download
  • Fixed scaling factor in lower scales for Text object
[3.0.0-beta.20] 1.21.6v2 by Unknown on Oct 16, 2025
Download
  • Fixed scaling factor in lower scales for Text object
[3.0.0-beta.19] 1.21.5v2 by Unknown on Oct 16, 2025
Download
  • Fixed scaling factor in lower scales for Text object
[3.0.0-beta.18] 1.21.10v1 by Unknown on Oct 16, 2025
Download
  • Add support for mc v1.21.10
  • NOTE: this version might crash on some cases as well as possibly crash while attempting to enter in /ct config
[3.0.0-beta.17] 1.21.9v1 by Unknown on Oct 16, 2025
Download
  • Add support for mc v1.21.9
  • NOTE: this version might crash on some cases as well as possibly crash while attempting to enter in /ct config
[3.0.0-beta.16] 1.21.8v1 by Unknown on Oct 16, 2025
Download
  • Add support for mc v1.21.8
[3.0.0-beta.15] 1.21.7v1 by Unknown on Oct 16, 2025
Download
  • Add support for mc v1.21.7
[3.0.0-beta.14] 1.21.6v1 by Unknown on Oct 16, 2025
Download
  • deprecate Render3d (only rendering methods)
  • deprecate Renderer (only rendering methods)
  • Text: changed Text to require DrawContext inside of
draw
  • Display: changed Display to require DrawContext inside of draw
  • Made renderOverlay register pass through the DrawContext instance so it can be used in 2d rendering
[3.0.0-beta.13] 1.21.5v1 by Unknown on Oct 07, 2025
Download
  • Added support for minecraft 1.21.5
ctjs Icon
Download ctjs
Select game version
Select platform