Shortify
Hate the fact that sharing URLs in Minecraft completely sucks? Hate the truncation? Then this plugin will fix all your problems regarding URLs in Minecraft.
This plugin will shorten all URLs present in a chat message and then changes the message to display the shortened links.
As far as I know (from decompiling and testing other plugins like bShortLinks, URL Shorten, and ShortURL), this is one of a few plugins that uses something other than word.startsWith("http://") for URL detection, and so can handle punctuation, multiple URLs, and URLs anywhere in the message properly.
It is fully configurable, and allows you to choose between a large pool of URL shorteners, including bit.ly, is.gd (default) and is the only URL shortening plugin that supports YOURLS. It also allows you to configure how it shortens the link (see config.yml after installation of the JAR).
Automatically shorten URLs:
With advanced multiple-URL support:
It's compiled for JRE6, and should be compatible with all future CraftBukkit versions.
There are several other URL shortening plugins available, but this one is objectively the best because:
- Optimized to not cause chat lag for messages that don't contain URLs
- Essentially lagless
- Does not require any external dependencies
- Can shorten a URL in ANY position in the message
- Has full REGEX detection to perfectly detect URLs, including advanced punctuation handling
- Allows you to choose between many URL shorteners
- Lets you configure to only shorten URLs above a specific length
- 100% compatible with BukkitForge and MCPC+
Here is a basic configuration description.
Here is the archive of stable versions (from latest to oldest).
Source on Github: https://github.com/vemacs/Shortify
Installation:
Simply download the jar to your /plugins folder, and then restart or reload your server.
Configuration:
See Shortify/config.yml for more info. Shortify should work out of the box, but if you want to use another service, change the config.
Please post feedback and suggestions!
Development builds of this project can be acquired at the provided continuous integration server. These builds have not been approved by the BukkitDev staff. Use them at your own risk.
@vemacs
And I'd be glad to set up Jenkins for you :)
@tuxed
Thanks for the major cleanup! I'll review them, and possibly make you a maintainer. The cleanup results in much easier implementation! However, goo.gl and bit.ly support is now borked, I'll be trying to fix that.
sent in a pull request, love it so far! (also posted to your /r/admincraft post)
@Delocaz
Bit.ly support is now done. See config.yml for instructions.
@Delocaz
I seem to have a functioning bit.ly implementation. There are currently some URL encoding issues, but they'll be fixed today.
@fogest
BitLy is already very simple, as it is a simple HTTP request, even without a library.
@frdmn
goo.gl is fully implemented, it only needs a few modifications to support bit.ly
@WayGroovy
Thanks for the suggestion. I want to convey that it is more stable than the reviewed version, though,
Instead of saying "Don't download the file to the right" you can say "Try my dev version Here: http://dev.bukkit.org/server-mods/shortify/files/4-shortify-1-2-0/ " and note that it is not yet reviewed by the dev bukkit team.
@fogest
Thanks for the link. However, because I already have goo.gl support mostly done (now need to write how to get the API key from the config), I will be focusing on that because:
-goo.gl is around 3x faster, according to pingdom
-goo.gl has much better uptime than bit.ly
-goo.gl support doesn't rely on any external libraries (just some JSON)
Don't get me wrong, I may try to implement bit.ly support when I have time, but it isn't a priority right now.
@vemacs
There is a library that makes using bit.ly VERY simple:
http://code.google.com/p/bitlyj/
@drtshock
Thanks! Now, if you would be as kind as to download it...
Fantastic idea :)
@XeonG8
With the new URL replacement engine, truncation should no longer be an issue.
@frdmn
There is experimental goo.gl support, to use it, set the shortener to googl in config.yml. Note that it uses my personal goo.gl API key, so don't use it too much.
@frdmn
I've implemented is.gd, as bit.ly is a bit difficult to implement.
@XeonG8
I've implemented a part of the second part of your request (to actually replace the message. As for the first part, I'll have to implement some permissions.
Pretty nice idea! could you implement bit.ly instead of tinyurl?
Perhaps with API-Key feature?
Kinda need a plugin that only allows certain domain urls to be posted by those with the permission, and if someone posts a long chat url that wouldn't fit on one line (because minecraft shoddy 1.4 client still can't create proper urls from strings that been split onto another line) then it creates a tiny url.