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!
This GitHub repository contains all the source code of the plugin. You can download a compiled .jar file through any of this links.
These are the only official download mirrors. Any downloads besides of these links may not be genuine.
Install the plugin into your Minecraft server.
Open your channel's Twitch Dashboard and create your custom Channel Points Rewards. (optional)
[!TIP] If needed, you can copy-paste the names of the Channel Points Rewards into a text document for later use.
Set your config.yml up. Adjust the settings and setup events for rewards, donations... You will need to link a Twitch account in order to connect use the Twitch API (the linked account needs to own/moderate all Twitch channels set in config.yml) There are two ways to link your Twitch account to the plugin:
Using a key-based authentication (recommended):
You will need a Client ID and Access token. You can get one mannually or through a website as Twitch Token Generator. Make sure to add all the needed scopes (the above link is already set to allow the needed scopes).
Uncomment CUSTOM_CLIENT_ID
and CUSTOM_ACCESS_TOKEN
on the config file and add your Client ID and Token onto the corresponding fields.
Once the server has started you just need to run /twitch link
and your account will be automatically logged in. You may need to refresh the token when it expires.
Log in through a browser:
You won't need any extra modification in your config.yml file. You will just need to run /twitch link
in-game and open the provided link. You may need to log in your Twitch account and authorise the app. Once you finish the log in process you can close the browser and your account will be linked.
[!WARNING]
Currently due to API limitations it's only possible to use the browser method if the login link is opened with the same machine the server is being ran on. You also have to repeat this process each time you start the server or reload the plugin.
Set up permissions for:
chatpointsttv.manage
).chatpointsttv.target
).chatpointsttv.broadcast
). · See Permissions for more information.
[!NOTE] The config file for the plugin should be in 'plugins/ChatPointsTTV/config.yml'.
To reset the original configuration, delete config.yml
and reload the plugin. The file will regenerate automatically.
Sections with a (*) are required to be changed in order to the plugin to be used.
["channel_1", "channel_2", "..."]
) {REWARD_NAME}: {ACTION}
, replacing {REWARD_NAME}
with the exact** reward name that is on Twitch and {ACTION}
with the desired action to run. 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.TWITCH_PRIME/TIER1/TIER2/TIER3: {ACTION}
. Replace {ACTION}
with the desired action to run.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.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.chat
, title
, all
, none
. Choosing none
will disable In-game alerts.chatpointsttv.broadcast
permission.RED
, GOLD
, DARK_PURPLE
...).chatpointsttv.broadcast
permission. You may want to translate these strings to your language for a better experience. Don't add spaces before or after the double quotes as the plugin already does this for you. English strings are set up in the file by default.This plugin is controlled by the /twitch
command followed by one of the following arguments:
/twitch link [method]
Links your Account. If a key-based credential is set it will use it. Otherwise will show the button for logging in through a browser (only works if the user logs in with the same machine as the server).
You can specify the method to use through the optional [method]
parameter.
Valid options: key
, browser
/twitch unlink
Unlinks your account and disables the plugin. You may need to log in again if you used the browser method.
/twitch status
Shows some plugin information such as: version, listened channel, linked account and connection status.
/twitch reload
Unlinks your account, reloads the configuration file and restarts the plugin.
Currently, there are 2 types of actions:
Spawning entities
Format: SPAWN <ENTITY NAME> [AMOUNT]
Example: SPAWN CREEPER 2
This action will spawn the menctioned entities for each player that is set up as a target (with the chatpointsttv.target
permission). The example action will spawn 2 Creepers on each player's location.
Running commands
Format: RUN <TARGET / CONSOLE> <COMMAND>
Example: RUN TARGET DAMAGE @S 2
This action will run the command as the console a single time, or as each player once. Command arguments are allowed. The example action will substract each player a heart from their health.
Giving Items
Format: GIVE <ITEM> [AMOUNT]
Example: GIVE DIAMOND 1
This action will give the stablished 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]
Example: TNT 1 0
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 to all players.
[!TIP] Argument names surrounded by <> means that it is a required argument. Arguments surrounded by [] are optional.
You should set up your events in your config file following this format:
TYPE_REWARDS:
- KEY:
- Action 1
- Action 2
- ...
or
TYPE_REWARDS:
- KEY:
- STREAMER:
- Action 1
- Action 2
- ...
- default:
- Action
Whereas TYPE_REWARDS
is replaces with the appropiate config key that is already on the file, KEY
with the channel points reward name, subscription tier or minimal amount of bits/subs.
[!IMPORTANT]
For follow events you shouldn't add reward keys. See placeholders on the default config.yml.[!TIP] You can now target multiple channels. If you do so, you can target some events to a specific channel following the second format. You can still follow the first example if you don't aim to target specific channels.
The latest version of the plugin needs the following scopes to function propertly:
channel:read:redemptions
: Needed to read channel point redemptions.user:read:moderated_channels
: Needed to check if user has permission to listen for follow events. (API only allows to listen to own/moderated channels)moderator:read:followers
: Needed to be able to listen for follows.bits:read
: Needed to listen for cheers.channel:read:subscriptions
: Needed to listen for subscriptions and gifts.chat:read
and user:read:chat
: Needed to show your stream chat in-game and use EventSub API.user:bot
and channel:bot
: Joins a stream chat to listen for subs.TARGET
ID: chatpointsttv.target
Behaviour: Configured actions will trigger on all players with this permission.
BROADCAST
ID: chatpointsttv.broadast
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.
Thanks to Twitch4J for the Java libraries used in this mod to communicate with the Twitch API.
Thanks to urgrue for the code for Twitch authentification.
Thanks to Mystiflow for their color convertion code.