ChatPointsTTV | Twitch integration for Streamers

ChatPointsTTV

ChatPointsTTV is a Bukkit plugin that helps you to create interactions between your Twitch stream and your Minecraft world. Set up your own rewards in exchange of channel points, follows, Bits, subs and more! Spawn mobs, give items or run any command when an event is triggered.
There's a whole range of use cases and possibilities to connect with your audience!

Setup

  1. Install the plugin into your Minecraft server.

  2. Set your config.yml and twitch.yml up. Adjust the settings and setup events for rewards, donations…

[!NOTE] You will need to link a Twitch account in order to connect use the Twitch API (the linked accounts must be the channel owner)

  1. Set up permissions for:

    • linking/reloading (chatpointsttv.manage).
    • the target player(s) (chatpointsttv.target).
    • people you want the reward messages broadcasted to (chatpointsttv.broadcast).

    · See Permissions for more information. · A permissions plugin, such as LuckPerms is recommended.

  2. Start your server and link your accounts

    • Start the Twitch client, if it's stopped /twitch start
    • Run /twitch link to get your device code
    • Click the button on the chat or go to https://twitch.tv/activate and enter the code provided by the plugin if it did not autocomplete.
    • Log in with your account and authorise the application.
    • Return to Minecraft and wait for the linking process to complete.

config.yml docs

To reset the original configuration, delete config.yml and reload the plugin. The file will regenerate automatically.

  • Enable Twitch: If set to true, the Twitch client will automatically start.
  • Ignore Offline Streamers: If set to true, the plugin will only listen to the people who is currently streaming. This also includes chat messages.
  • Ignore Offline Events: If enabled, events from offline streamers will be ignored.
  • Show Chat: If enabled, your stream chat will be shown in-game to all players in the server.
  • Log Events: Determines whether all events will be logged. true means that all channel point rewards, cheers, subscriptions and gifts will be logged into the console. false means that they won't be logged.
  • In-game Alerts Mode: How will the game notify of an event. Valid options: chat, title, all, none. Choosing none will disable In-game alerts.
  • Colors: Allows you to customize every color of the title messages. See a list of valid options in the Bukkit API Docs.

twitch.yml docs

  • Channel Point Rewards: A list containing all channel point rewards that you want an action set up. See Reward Actions for more information.
    You need to follow this format: {REWARD_NAME}: {ACTION}, replacing {REWARD_NAME} with the exact reward name that is on Twitch and {ACTION} with the desired action to run.

  • Follow Rewards: A list with all the actions that will be executed when a channel gets a new follower.

  • Cheer Rewards: A list containing all cheer rewards that you want an action set up. See Reward Actions for more information.
    You need to follow this format: AMOUNT: {ACTION}, replacing AMOUNT with the minimal ammount of bits that will be needed to trigger the event and {ACTION} with the desired action to run.

  • Sub Rewards: A list containing all subscription rewards that you want an action set up. See Reward Actions for more information.
    You need to follow this format: TWITCH_PRIME/TIER1/TIER2/TIER3: {ACTION}. Replace {ACTION} with the desired action to run.

  • Gift Rewards: A list containing all subscription gifts rewards that you want an action set up. See Reward Actions for more information.
    You need to follow this format: AMOUNT: {ACTION}, replacing AMOUNT with the minimal ammount of subscriptions that will be needed to be gifted in order to trigger the event and {ACTION} with the desired action to run.

  • Raid Rewards: A list containing all raid rewards that you want an action set up. See Reward Actions for more information.
    You need to follow this format: AMOUNT: {ACTION}, replacing AMOUNT with the minimal ammount of raid viewers that will be needed to trigger the event and {ACTION} with the desired action to run.

  • Chat Blacklist: List of usernames of chat bots and other users that will be ignored for the in-game stream chat.

  • Mob Glow Override: Overrides the global value set in the config.yml file for Twitch events.

  • Display Name on Mob Override: Overrides the global value set in the config.yml file for Twitch events.

  • Colors Override: Overrides the global colors set in the config.yml file for Twitch events. See a list of valid options in the Bukkit API Docs.

For a better streaming experience, it is possible to translate the plugin's messages into your language by editing the localization.yml file.

Commands

This plugin is controlled by the /twitch command followed by one of the following arguments:

  • /twitch accounts
    Displays all connected accounts and allows the user to easily add or remove accounts.

  • /twitch link
    Generates a Twitch Device Code and starts the linking process.

  • /twitch unlink [account]
    Unlinks a Twitch account. If no extra parameter is entered, it will unlink all accounts.

  • /twitch status
    Shows some plugin information such as: version, listened channels and connection status.

  • /twitch reload
    Reloads the configuration file and restarts the plugin.

  • /twitch start
    Starts the Twitch client. This is required to use the Twitch functionality.

  • /twitch stop
    Stops the Twitch client. This is useful to stop incoming events without the need of unlinking any accounts.

  • /twitch test <event type> <...>
    Fires a custom test event. Useful for testing your configuration.
    For channel point rewards that contains whitespaces in their name, it can be enclosed between double quotes.
    Valid event types:

    • channelpoints
    • cheer
    • follow
    • raid
    • sub
    • subgift

Reward Actions

  • Spawning entities
    Format: SPAWN <ENTITY NAME> [AMOUNT] [TARGET USER]
    Example: SPAWN CREEPER 2 GospelBG
    This action will spawn an entity for each player that has the chatpointsttv.target permission or a specific player (when the [TARGET USER] field is used). The example action will spawn 2 Creepers on each player's location.

  • Running commands
    Format: RUN <TARGET USER / "TARGET" / "CONSOLE"> <COMMAND>
    Example: RUN TARGET DAMAGE @S 2
    This action will run a command as the console, all target players or a specific player. The example action will substract each player a heart from their health.

  • Giving Items
    Format: GIVE <ITEM> [AMOUNT] [TARGET USER]
    Example: GIVE DIAMOND 1 GospelBG This action will give the established amount of the set items to all players with the chatpointsttv.target permission. The example action will give all players (with the "target" permission) a diamond.

  • Explosions
    FORMAT: TNT <AMOUNT> [FUSE TIME IN TICKS] [TARGET USER]
    Example: TNT 1 0 GospelBG This action will spawn a TNT to all players with the chatpointsttv.target permission that will explode after the specified fuse time. The example action will spawn a TNT that will explode instantly in GospelBG's position.

[!TIP] Argument names surrounded by <> are required arguments. Arguments surrounded by [] are optional.

You should set up your events in your config file following this format:

TYPE_REWARDS:
    - EVENT:
        - Action 1
        - Action 2
        - ...

or

TYPE_REWARDS:
    - EVENT:
        - STREAMER:
            - Action 1
            - Action 2
            - ...

        - default:
            - Action

TYPE_REWARDS must be replaced with the appropiate config key that is already on the file and EVENT with the channel points reward name, subscription tier or minimal amount of bits/subs/viewers. In case of follow events, the EVENT line should be ommited (see placeholders in twitch.yml).

For your actions, you can use the {USER}, {TEXT} and {AMOUNT} fields to use data from your events inside of your actions. {USER} will be replaced with the chatter's username. {TEXT} will be replaced with the text input of the Channel Points Reward. {AMOUNT} will be replaced with the bits/subs/raided viewers amount.

 

<details> <summary>Example Event</summary>

 

CHANNEL_POINTS_REWARDS:
    My reward:
        your_favourite_streamer:
            - SPAWN CREEPER 3 Steve
        default:
            - GIVE DIAMOND 1

 

</details>

 

Twitch Scopes

The latest version of the plugin needs the following scopes to function propertly:

  • channel:read:redemptions: Needed to read channel point redemptions.
  • channel:read:subscriptions: Needed to listen for subscriptions and gifts.
  • moderator:read:followers: Needed to be able to listen for follows.
  • bits:read: Needed to listen for cheers.
  • chat:read and user:read:chat: Needed to show your stream chat in-game and use EventSub API.
  • user:bot and channel:bot: Needed to read stream chat messages

Permissions

  • TARGET
    ID: chatpointsttv.target
    Behaviour: Configured actions will trigger on all players with this permission.

  • BROADCAST
    ID: chatpointsttv.broadcast
    Behaviour: All players with this permission will get a banner message when an action is triggered.

  • MANAGE
    ID: chatpointsttv.manage
    Behaviour: Players with this permission will be allowed to run the /twitch command and link a Twitch account.


Comments

Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files

Bukkit