PluginLicenseRef-All-Rights-Reserved
TwitchRewards999
TwitchRewards999 is a comprehensive plugin for Minecraft designed to bridge the gap between your Twitch stream and your Minecraft server. It rewards players for their watch time, fostering a more engaging and interactive community.
31
Downloads
0
Followers
5 months ago
Updated
📦
1
Versions
📖About TwitchRewards999
⚙️ Core Systems
- Twitch Account Linking
Players can link their Minecraft account to their Twitch account using a simple in-game command. This is the foundation for tracking watch time and rewards.
- Command:
/linktwitch <twitch_username> - Storage: Linked accounts are stored in
usernames.ymlin the formattwitch_username: minecraft_uuid.
- Streamer Configuration
Server administrators can easily configure the main Twitch channel to be tracked. The plugin will monitor this channel for live status updates.
- Configuration: Set the
twitch_channelandtwitch_linkinconfig.yml. - API Integration: Requires a Twitch Client ID and Secret to be added to the
config.ymlfor Twitch API communication.
- Live Announcements
When the configured streamer goes live, a customizable announcement is broadcast to all players on the server, encouraging them to join the stream.
- Configuration: Enable or disable this feature and customize the message in
config.yml. - Example Message:
§d[Live] %streamer% is now streaming! Watch at: %streamlink%
- Watch Time Tracking System
The plugin tracks the watch time of all linked players who are online on the Minecraft server while the streamer is live.
- Logic: An asynchronous task runs every second to check the streamer's live status and update the watch time for online, linked players.
- Storage: Watch time data is stored in
time.ymlfor each player, includingseconds_watchedandunclaimed_rewards.
- Reward Interval Logic
Rewards are automatically granted to players based on a configurable time interval.
- Configuration: Set the
reward_interval(in seconds),reward_type(pointsoritem), and therewarditself inconfig.yml. - Example: If
reward_intervalis 600, a player will receive a reward for every 10 minutes of watch time.
- Offline Reward Handling
If a player earns a reward while they are offline, the plugin stores it as an "unclaimed reward". When the player logs back in, they are notified and given a unique code to redeem their rewards.
- Logic: A
PlayerJoinEventlistener checks for unclaimed rewards and generates a redeem code. - Notification: The player receives a message like:
§eYou’ve earned rewards for watching %streamer%! Use /twitchredeem <code> to claim them.
- Redeem Code System
A flexible system for redeeming rewards using unique codes. Codes can be generated automatically for offline rewards or manually by streamers/admins.
- Storage: Codes are stored in
redeemcodes.ymlwith theirreward_type,reward, anduses_left. - Expiration: Codes are automatically removed when their
uses_leftreaches 0.
- Streamer Reward Code Generation
Streamers and administrators can generate custom reward codes to share with their audience during a stream.
- Command:
/twitchreward generate - Configuration: The reward type, value, and number of uses for generated codes can be configured in
config.yml.
- Twitch Points System
An in-plugin currency system that allows players to accumulate "Twitch Points" as rewards.
- Storage: Player point balances are stored in
twitchpoints.yml. - Command: Players can check their balance with
/twitchpoints.
- Watch Time Tracking (via Twitch IRC)
To provide an accurate watch time tracking system, TwitchRewards999 now integrates directly with Twitch IRC. This system tracks players who are actively participating in the stream's chat.
- How it works:
- The Minecraft plugin connects to the streamer's Twitch chat via Twitch IRC.
- It tracks users who join or leave the chat, and those who send messages.
- Only players who are identified as active chatters will have their watch time tracked.
- Setup:
- Configure your Twitch Client ID, Client Secret, and OAuth Token in the plugin's
config.yml.
- Configure your Twitch Client ID, Client Secret, and OAuth Token in the plugin's
Part 1: Setting up the Twitch Extension
Create a new Twitch Extension:
- Go to the Twitch Developer Console.
- Click on "Extensions" in the left-hand menu.
- Click "Create an Extension".
- Give your extension a name (e.g., "MyRewardsExtension") and select "Panel" as the extension type.
- Click "Create Extension".
Get your Extension Credentials:
- In your extension's dashboard, you will see your Client ID.
- Click on the "Settings" tab. Your Extension Secret is here.
Generate and Upload the Frontend Files:
- Start your Minecraft server with the TwitchRewards999 plugin installed. This will automatically generate the
extension_frontendfolder containingpanel.htmlandviewer.jsin the same directory as your plugin's configuration folder (e.g.,plugins/TwitchRewards999/extension_frontend). - Go to the "Asset Hosting" tab in your extension's dashboard.
- Drag and drop the contents of the newly generated
extension_frontendfolder (panel.htmlandviewer.js) into the upload area. - Set the "Panel Viewer Path" to
panel.html. - Click "Save Changes".
- Start your Minecraft server with the TwitchRewards999 plugin installed. This will automatically generate the
Part 2: Setting up the Minecraft Plugin
Install the Plugin:
- Place the
TwitchRewards999-1.0.0.jarfile (from thetargetdirectory) into your Spigot server'spluginsfolder. - Start your Minecraft server. This will generate the plugin's configuration files.
- Place the
Configure the Plugin:
- Open the
plugins/TwitchRewards999/config.ymlfile. - Set the
twitch_channelto your Twitch username (the channel you want to track). - Set the
twitch_linkto your Twitch channel URL. - Fill in your
twitch_client_idandtwitch_client_secret(the same ones from your Twitch Extension). - Obtain a Twitch OAuth Token:
- Go to a Twitch Chat OAuth Password Generator (e.g., https://twitchapps.com/tmi/).
- Authorize the application to get your OAuth token. It will start with
oauth:. - Copy the full token.
- Set the
twitch_oauth_tokeninconfig.ymlto the OAuth token you just obtained. - Customize the rest of the settings (rewards, messages, etc.) to your liking.
- Save the
config.ymlfile and restart your server or run/twitchreload.
- Open the
Part 3: Final Steps
Activate the Extension:
- Go back to your Twitch Extension's dashboard.
- Go to the "Version Status" tab and follow the steps to move your extension to "Hosted Test" and then to "Released".
- Once released, you can install the extension on your own channel by going to your Creator Dashboard -> Extensions -> My Extensions.
Test the System:
- Start streaming on Twitch with the extension active.
- Have a player link their Twitch account in-game with
/linktwitch <their_twitch_username>. - Watch the stream for the configured
reward_interval. - You should see rewards being granted in-game.
- Check the server console for any errors.
You have now successfully set up the complete TwitchRewards999 system!
💬 Commands
| Command | Description | Permission |
|---|---|---|
/linktwitch <twitch_user> |
Link your Minecraft account to your Twitch account. | (everyone) |
/twitchpoints |
Shows your current Twitch Points balance. | (everyone) |
/twitchreward generate |
Generates a reward code for the streamer to share. | twitchreward.admin |
/twitchredeem <code> |
Redeem a stored or shared reward code. | (everyone) |
/twitchreload |
Reloads the plugin's configuration and data. | twitchreward.admin |
/twitchtime <player> |
See a player's watch time and unclaimed rewards. | twitchreward.admin |