Ban Plugin Support

So you like Honeypot, but it doesn't support XYZ ban plugin? You have two options. Code the support for Honeypot or use the new custom type.

Add ban plugin support to Honeypot

Since you love Honeypot so much and want to contribute back so others can take advantage of integrations with new ban plugins, we'll start there.

We'll assume you use a ban plugin called MostAwesomeBanPluginEver. This plugin has a special ban command "/mabpe ban" in order to ban people. You think it really is the most awesome ban plugin ever and so you want Honeypot to support it and are willing to help. Here's how you do it. (this example assumes working command-line tools like git and maven; if you're on Windows check out Cygwin or find GUI tools like SmartGIT)

# create a github.com account, navigate to https://github.com/andune/Honeypot and click fork. Now you have your own copy

# check out your copy of the Honeypot source code
git clone https://github.com/yourname/Honeypot Honeypot
cd Honeypot

# build source code, verify it works.
mvn package
# should see the Honeypot.jar here with a current timestamp, because you just built it
ls -l target/Honeypot.jar

If you can accomplish this, you're only a few simple steps away from adding support to Honeypot. With the recent refactor, I've made it so Honeypot can do 99% of the work for you, all you have to do is tell it what commands to use. Here is an example using EasyBan. Yes, it really is that easy. Just copy the EasyBan example into your own file, change the commands to map to the new plugin, and then re-build the JAR.

Of course do some testing and make sure it's all working. Once you're sure it's working, you want to check in your changes to git, push them back to github and then you can use github to create a pull request for me to include in the official plugin!

git add src/main/java/com/argo/bukkit/util/MostAwesomeBanPluginEver.java
git push origin
# now you can see your changes on github, go make a pull request

Leverage Honeypot custom type

OK well that just seems like way too much work for you, can't you just customize it locally for your own server? Sure, just edit your Honeypot config.yml:

banSystem: custom
customBanCommand: mabpe ban %player% %reason%
customKickCommand: mabpe kick %player% %reason%

When Honeypot starts up, it will see you've chosen the custom banSystem and run the commands you specify for kick/ban, obviously replacing %player% with the playername and %reason% with the reasons (that you set elsewhere in the config).


Comments

Posts Quoted:
Reply
Clear All Quotes