Skip to content

Jakkoble/TwitchWhitelist

Repository files navigation

CodeFactor

TwitchWhitelist

This is a customisable 1.8-1.21 Spigot Plugin to Whitelist Players via Twitch Channel Points Rewards.

Setup

  1. Setup a PaperMC (recommended) or SpigotMC Minecraft Server like here
  2. Download the latest Release File
  3. Put the downloaded TwitchWhitelist.jar into the /plugins/ folder of the created PaperMC Server
  4. Start the Server via your Start Script (start.bat or start.sh)
  5. After the Server finished starting, stop it (Type stop in Console)
  6. Navigate in your /plugin/ folder and then in the /TwitchWhitelist/ folder
  7. Open the config.yml File set it up for your needs (You must set the token and channelID => See Further Information)
  8. Start the Server again and everything should work, have fun :)

Configuration Notes

enabled — Whether the plugin is enabled or not (Possible Values: true, false)
tokenFurther Information
channelIDFurther Information
offlineServer — Whether you are running an offline server or not (Possible Values: true, false)
ticketsPerUser — Amount of tickets, a single user can redeem. (Possible Values: >= 1)
serverName — This name will be printed within the successMesssage, alreadyWhitelistedMessage and tooManyPlayersWhitelisted Message
channelRewardName — The name of your Twitch Channel Points Reward (see Channel Reward Setup)
sendMessage — Whether the plugin should respond on redeems on your Twitch channel (Possible Values: true, false)
successMessage — Message for a successful whitelist action (on Twitch)
playerNotFoundMessage — Message when a player with the given name was not found (on Twitch)
alreadyWhitelistedMessage — Message when a player with the given name is already whitelisted
tooManyPlayersWhitelisted — Message when a twitch user has already reached the Ticket Limit (ticketsPerUser Entry)
notWhitelistedMessage — Message that gets displayed when a player tries to connect to the server and he is not whitelisted yet

%s is a placeholder for dynamic parts (e. g. player name, server name) => do not mix the order if there are multiple placeholders

Channel Reward Setup

In Order the Bot listens to the right Channel Points Reward, be sure to setup a Channel Points Reward and put the Name of the Reward in the config.yml under chanelRewardName.

Be sure to enable the Option Require Viewer to Enter Text in the Channel Points Reward Edit Menu.

One Example: Name of the Channel Points Reward would be Minecraft Whitelist Ticket.

Whitelist Command

Permission: whitelist.cmd

Commands

whitelist on — Enable the Whitelist on your Server
whitelist off — Disable the Whitelist on your Server
whitelist list — Get an overview over all Whitelisted Players
whitelist add playerName — Add a Player to the Whitelist manually by the Minecraft Player Name
whitelist remove playerName — Remove a Player from the Whitelist by the Minecraft Player Name


Further Information

You can either use a second Twitch Account or your own Twitch Account for the token. You can get your Bot Chat Token => Access Token here.

The channelID is the ID of your Twitch Account, get it here.

Attention: By enabeling Offline Servers the Plugin will not work on Online Servers until you disable it again.
You open yourself an security risk with offline servers. To solve this use third party solutions like AuthMeReloaded.

If you need further help, feel free to open a new Issue. In case you like my project, please give this Repository a ⭐.