Home›Java›Mods›CraftTweet
CraftTweet
ModsJava

CraftTweet

Java mod listed for Minecraft 1.7–1.16. Downloads from the MC Java Mods app on Android.

⬇ Download on Spigot
[​IMG]

CraftTweet - Connects Twitter Accounts to Minecraft accounts

[​IMG]
​
Overview
CraftTweet links any player's Minecraft account to Twitter using Twitter4J, making it easier for server owners to interact with their players' social media accounts.

How does it work?
CraftTweet authenticates users based on Twitter's OAuth. You'd have to apply for a developer account in order to build an application for your own server. When authenticated on Twitter, users will then receive a pin to confirm ingame.

Requirements
Installation
First, apply for a developer account using your network's twitter page. After applying for your developer account and gaining access to build applications, head over to your twitter's developer dashboard.

upload_2021-2-9_23-19-14.png ​

Go to your Projects tab, and click Create App under the Standalone apps. Then, configure your app's information and save your API key and API secret key since they will be used in the configuration file (do not share those with anyone!). Assign permissions based on your needs (in most instances it's only Read + Write).

upload_2021-2-9_23-21-12.png
​
Drop CraftTweet.jar into your plugins folder and start your server.

Configuration
After starting your sever, head over to your plugin's folder and edit the configuration file.

Code (YAML):

mysql
: # MySQL Server Details, self-explanatory
  host
: localhost
  port
: 3306
  database
: twitter
  username
: root
  password
: test
oauthp
: somePublicKey # Use your twitter application's API key.
oauths
: somePrivateKey # Use your twitter application's API secret key.
limitHour
: 15 # Limit how many tweets a user can send in an hour.
messages
:
  prefix
: "&bTwitterLink &8| "
  noperms
: "&cYou do not have the right to execute this command!"
  unknownformat
: "&cUnknown format! Use /link to start."
  general
:
    isLinked
: "&7Your current Minecraft account is &alinked &7to the Twitter account &a%account%&7!"
    isNotLinked
: "&7Your current Minecraft account is &cnot linked &7to any Twitter account!\n&7Use &a/link create &7to start the linking process."
  link
:
    success
: "&aYou have succesfully linked your twitter account with your Minecraft account!"
    url
: "&7Please click the following link to authenticate your twitter account with your Minecraft account\n&a%url%\n&7Use your &aPIN &7using /link confirm &aPIN &7to initiate the link."
  error
:
    token
: "&cThe giving token is wrong, please try again!"
    norequest
: "&cYou have to iniate a linkage request before confirming!"
    notlinked
: "&cYou do not have a twitter account linked!"
    alreadylinked
: "&7You already have a twitter account linked!"
 
Commands
In order to link a Twitter account, the permission link.use should be applied.
Additionally, this command can ONLY be executed by console.
For Developers
CraftTweet has it's own API based on CompletableFutures and it's own queuing system.

Code (Java):
Player p ; [ /SIZE ]
String tweet = "Hello World!" ; [ /SIZE ]
[SIZE = 6 ] [SIZE = 4 ] if (TwitterCache. doesTwitterExist (p. getUniqueId ( ). toString ( ) ) ) { // Checks if a player has a twitter account linked.[/SIZE][/SIZE]
[SIZE = 6 ] [SIZE = 4 ]TwitterPlayer twitterPlayer = TwitterCache. getPlayer (p. getUniqueId ( ). toString ( ) ) ; // Get his twitter factory instance.[/SIZE][/SIZE]
[SIZE = 6 ] [SIZE = 4 ]QueueManager. addToQueue (twitterPlayer, tweet ) ; // Queue his tweet.[/SIZE][/SIZE]
[SIZE = 6 ] [SIZE = 4 ] }


If you would like to bypass the Queue, take a look at TwitterAPI's github page based on CompletableFutures


Feedback
If you encounter any errors or issues, or have any feedback please do so by either sending me a direct message or replying to this resource's thread.


To-Do List

Commands

Plugin details

Read from the plugin's own plugin.yml.

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

CraftTweet is a free Minecraft Java mod. Compatible with Minecraft 1.7, 1.8, 1.9, 1.10 and newer. Downloaded 194 times (via Spigot). Download it and open it directly in the game.

Explore more