Skip to content
KK edited this page Jun 29, 2024 · 11 revisions

Using the Plugin in Streamer.bot

For setting up the Minecraft server, please see the Getting Started page.

Make sure that you have Streamer.bot installed before following guide!


Video Guide:

Video Guide

Click me ^

1. Connecting to the WebSocket Server

  1. Inside Streamer.bot, navigate to the Servers/Clients tab.
  2. Click the sub-tab Websocket Clients.
  3. Inside the window, add a new Host, by right-clicking and pressing Add.
  4. Inside the popup window, set the Name to Minecraft WebSocket Server.
  5. Inside the popup window, set the Host to ws://{localhost}:{8887}. (please replace {localhost} with your host, and {8887} with your port number)
  6. Click Ok.

You will be changing message actions later. Don't worry!

2. Setting up Actions

In this guide, you will be setting up the 'basics' of connecting to the WebSocket server, listening to events, and sending commands.

If this sounds like a lot, don't worry! 99% of this is already done for you!


Actions Download (Requires being in the streamer.bot discord to navigate to the message).

  1. Import the actions above.
  2. Navigate to the MC WS Message action, you should see the following:

Sub Actions

  1. If you have a authentication token on the server, you need to change the %authenticationBearerToken% to the token.

Auth Bearer Token

  1. Go back to the Websocket Clients tab, and edit the Minecraft WebSocket Server client. Change the Message to the MC WS Message action.

Websocket Client Message

  1. Connect the websocket client to the server.

3. Setting up events

  1. Create a new action named MC WS Event-{event name}. Events List
  2. Add any sub-actions you want to the action.

4. Sending Commands

You have 2 ways to send commands to the server.

C#:

CPH.WebsocketSend("Command {command}");

Sub-Actions:

  1. Define a variable named cmd and set it to the command you want to send.
  2. Add a C# Method subaction, and call MC WS Message Handler, and set the method to SendCommand.

More Information coming soon!