Giter Site home page Giter Site logo

twitterevents's Introduction

<<<<<<<<<<<<<<<<<<<<<<<<<<<<< O V E R V I E W >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

TwitterEvents adds Twitter integration to the hMod Minecraft server.

TwitterEvents can tweet the following events (with customizable messages):
* Player login
* Player logout
* Player death
* Player kick
* Player ban

<<<<<<<<<<<<<<<<<<<<<<<<< I N S T A L L A T I O N >>>>>>>>>>>>>>>>>>>>>>>>>>>

=== Copy Files
1. Unzip the TwitterEvents.zip file.
2. Copy twitter4j-core-2.1.9-SNAPSHOT.jar to your hMod plugins directory
3. Copy TwitterEvents.jar to your hMod plugins directory
4. Add a reference to TwitterEvents to the plugins line of your
   server.properties file

=== Register With Twitter
5. In your command line, navigate to your hMod plugins directory
6. Execute this command exactly: 
   java -jar TwitterEvents.jar
7. Follow the instructions of the Register program
   - Go to the Twitter URL it directs you to
   - Click the Allow button
   - Copy the PIN provided by Twitter
   - Paste the PIN at the prompt in the Register program
   - Verify that TwitterEvents.properties was created in your hMod bin directory
   
=== Load and customize the plugin
8. Load TwitterEvents by restarting your server or with a loadplugin command
9. Once the plugin is loaded, it will fill in the rest of its properties
   in the TwitterEvents.properties file
10.You can now change which messages TwitterEvents tweets by editing the
   .properties file
   
* Note: If for some reason you need to issue TwitterEvents a new oAuth keypair,
  you must disable the hModEvents application in your Twitter settings.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< F A Q s >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Q. Why do my servers tweets have random numbers at the end?
A. Twiter blocks duplicate tweets. TwitterEvents makes lots of duplicate
   tweets. The timestamps at the end of the tweet are there to defeat the 
   duplicate tweet detection.
   
Q. Why do I get class not found errors when trying to register on Vista/Win7
   and why are the TwitterEvents .jar files green?
A. It's a Windows bug. The .jar files are encrypted. Decrypt them with the 
   directions here:
   - http://www.vistax64.com/vista-general/90769-green-filenames-why.html
  
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< C O M M A N D S >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

/tweet - Sends a tweet on behalf of the server. Must be granted to users or
         groups before use. (Can also be run from the console.)
         

<<<<<<<<<<<<<<<<<<<<<<<<< C O N F I G U R A T I O N >>>>>>>>>>>>>>>>>>>>>>>>>

The TwitterEvents.properties file has the following parameters:

* accessToken/accessTokenSecret -- text
- Your Twitter oAuth keypair used for authenticating with Twitter

* tweetLogin (True)
  tweetDisconnect
  tweetBan
  tweetKick
  tweetDeath 
  tweetServerStatus (True)
- Enables or disables individual tweets -- T/F (default False)


* tweetLoginMessage
  tweetDisconnectMessage
  tweetBanMessage
  tweetKickMessage
  tweetDeathMessage
  tweetPluginStartMessage
  tweetPluginStopMessage
- The messages to tweet for a given event -- text

* Note: Message parameters use {player}, {moderator}, and {reason} as template fields.
  These strings will be replaced with their relevant data at runtime.
  
* Note: Server stop tweets cannot be reliably be sent in the event of catistrophic
  server crash. If the server crashes unexpectedly, nothing inside the server can
  alert you.

<<<<<<<<<<<<<<<<<<<<<<<<< I N T E G R A T I O N >>>>>>>>>>>>>>>>>>>>>>>>>>>> 

TwitterEvents registers a custom hook for integration with other plugins.
To send a tweet from your plugin, use the callCustomHook api as follows:
  
etc.getLoader().callCustomHook("tweet", new Object[] {"Tweet text here"});
  
<<<<<<<<<<<<<<<<<<<<<<<<<<<< C O N T A C T >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

TwitterEvents is written by Ryan Michela ([email protected])

Additional code by:
Shaun (sturmeh) - SuperPlugin.java
Yusuke Yamamoto - Twitter4J (twitter4j.org)

twitterevents's People

Contributors

rmichela avatar

Stargazers

 avatar

Watchers

 avatar  avatar

twitterevents's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.