TwitchSync 1.4.2

Give rewards to subscribers or followers!

  1. Okx
    Native Minecraft Version:
    Legacy (< 1.13)
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    • 1.13
    • 1.14
    Source Code:
    https://github.com/okx-code/TwitchSync
    This plugin will allow you to give your Twitch subscribers or followers special rewards on your server. You may give them a rank and/or execute commands, but it requires a little bit of setting up first.

    Prerequisites:
    1. Your server must be hosted on a VPS or Dedicated server. Shared hosting will not work.
    2. A web server on port 8080 (configurable) will be setup automatically.

    Setup is as follows:
    1. Log in on https://dev.twitch.tv/
    2. Then, click "Your Dashboard" in the top right hand corner
    3. Click "Applications"
    4. On the right hand side, click "Register Your Application"
    5. Choose a name, such as "Yourname Minecraft Subscriber sync. This name will be shown to your users when they sync their account.
    6. In the redirect URI, put http://your-server-ip:8080. If you have a domain over your server IP, you may use that as a replacement for the IP.
    7. Select "Game Integration" for the category
    8. Make sure that you copy the client ID, and copy & generate a client secret. You'll need those two later.
    9. Turn your Minecraft server off
    10. Place this plugin inside it
    11. Turn your Minecraft server on, and then turn it back off after the plugin has generated its config.
    12. In the config file, put in your channel name, the client ID, and your client secret. You will also need to replace redirect-uri with the redirect URI you put in Twitch earlier.
    13. Change anything else as you see fit.
    14. Start your server.
    15. You may now run /twitchsync in-game. It will open a URL, which when clicked on should link you to the redirect URI you set up earlier.
    16. If all goes well, you should receive the message "You have successfully received the Twitch subscription rewards.". If you receive an unknown error message, try again a few times. If the problem persists, enable debug-mode in the config and PM me the console logs when you receive the unknown error message.
    Configuration
    This is the default configuration for TwitchSync.
    Code (Text):

    # The channel name(s) to check for subscription/follows.
    channel-names:
    - required

    # The client ID given by Twitch.
    client-id: required

    # The client secret given by Twitch. Remember not to tell anyone this!
    client-secret: required

    # Port to host the HTTP server on
    server-port: 8080

    # Redirect URI for Twitch authentication. This has to be set as the same as Twitch
    redirect-uri: http://localhost:8080

    # How many minutes it takes for twitch sync URLs to expire.
    expiry-time: 10

    # Note that these messages are sent by the web server and use HTML, not chat formatting.
    messages:
      subscription:
       no-subscription-program: "The channel does not have a subscription program set up."
       success: "You have successfully received the Twitch subscription rewards."
      follow:
       success: "You have successfully received the Twitch following rewards."
      success-both: "You have received both the following and subscription rewards."

      # If you have subscription or following rewards disabled you might want to change this
      # to say "You are not following" or "You are not subscribed" to make it clear
      # that it's only possible to get rewards for one thing
      not-both: "You are neither subscribed or are following the channel."
      already-done: "You have already redeemed subscription and/or follow rewards."

      state-not-found: "This link has either expired, or already been used."
      player-not-found: "We cannot find you on the server. Are you online?"
      invalid-url: "The URL is invalid"
      unknown-error: "An unknown error occurred. Please try again."

    # revoke subscriber/follow rewards every X days
    # this will remove the rank and run revoke-commands
    revoke-interval-days: 1

    # What to do when somebody subscribes
    subscribe:
      enabled: true

      # Rank to give a player. Only used if Vault and a permissions plugin is installed.
      # Set to 'none' to disable.
      rank: 'Subscriber'

      # Commands to execute.
      # You can use the following placeholders:
      # %name% - name of the player who subscribed
      # %channel% - channel their subscription is registered to
      # %channelid% - channel id of %channel%
      commands:
      - 'broadcast %name% has subscribed!'
      - 'give %name% diamond 1'

      # commands to run when a player is no longer subscribed
      # this only supports the %name% placeholder
      revoke-commands:
      - 'give %name% dirt 1'
    # What to do when somebody follows
    follow:
      enabled: true
      rank: 'Follower'
      commands:
      - 'broadcast %name% has followed the channel!'

      revoke-commands:
      - 'broadcast %name% has unfollowed :('
    # Enable debugging information.
    # If you encounter an unexpected error please enable this
    # and send the results to the dev!
    debug-mode: false

    To give ranks, you require Vault.

    The command is /twitchsync and it takes no arguments.

    Developers

    The plugin provides two events: PlayerSubscriptionEvent and PlayerFollowEvent.

    They both extend PlayerEvent and provide an additional method named getChannelId()

    Issues


    If you experience any issues please join my Discord. Make sure you enable debug-mode in the config file and send me your console output and config file.
    niho1212 likes this.

Recent Updates

  1. 1.4.2
  2. 1.4.1 Add 1.14 compatability
  3. Revoke expired subscriptions

Recent Reviews

  1. Pr0Pancakeslol
    Pr0Pancakeslol
    5/5,
    Version: 1.4.2
    Thanks! good plugin works good on shared hosting right now until I can afford and learn dedicated hosting.
  2. ConnerHall
    ConnerHall
    5/5,
    Version: 1.4.2
    Great resource, very easy to setup and use. Would be nice to add a tiered subscrition system to match Twitch's tiers. Other than that, great plugin.
  3. Z0eff
    Z0eff
    5/5,
    Version: 1.4.2
    Does exactly what it says without any hassle. Very quick support as well, had an issue where the permission group given would include a world=world context, which was quickly patched out.
  4. Jadiction
    Jadiction
    5/5,
    Version: 1.4.1
    Works great on my server. A simple command to allow followers and subscribers of specified Twitch channels.