-
-
Notifications
You must be signed in to change notification settings - Fork 1
Send HTTP Request
So you want to trigger an effect using something other than the Stream Deck plugin? Here's how to do it using HTTP requests!
For background, I'll explain how to the mod knows to trigger an effect. The Minecraft mod hosts an HTTP server (by default on port 3000) that listens on an endpoint for each effect. When an HTTP request is made with the correct parameters and endpoint, the effect is triggered.
For a simple example, I'll use the Receive Chat effect:
A full url to request could be http://localhost:3000/receivechat?message=Hello&device=test
Let's break it down:
- The
http://localhost:3000
is the mod's host computer and port. - The
/receivechat
tells the mod which effect to trigger. - Everything after the
?
are the parameters to pass along:-
message=Hello
tells the mod the message to show isHello
-
device=test
tells the mod what device ID is triggering the effect. (This is what is tracked using the/effectmc trust
command)
-
To trigger an effect, just send a request to the right endpoint! If nothing is happening, make sure you have the device parameter set and have trusted it. (Instead of pushing a Stream Deck button just send an HTTP request.)
The device ID can be any string, as long as it's constant the mod will remember.
For information on what the parameters are as well as the endpoint for each effect, they have been added to the bottom of each effect's page in the Effect Compendium.
If you've ever used the tool Postman, I've also exported a collection that has an example request for each effect: EffectMC.postman_collection.json
- Join Server
- Show Title
- Show Action Message
- Set Skin Layer
- Sent Chat Message
- Receive Chat Message
- Trigger Disconnect
- Play Sound
- Stop Sound
- Show Toast
- Open Book
- Narrate
- Load World
- Set Skin
- Open Screen
- Set FOV
- Show Chat
- Set POV
- Set GUI Scale
- Set Brightness/Gamma
- Set Gamemode
- Set Render Distance
- Rejoin
- Show Item Toast
- Set Volume