This plugin was inspired by @twanneke8 and Shortest4Bungee by @Creepers
This plugin can be used on Bukkit servers and Bungee Cord.
Master:
ttttDev:
**I am in no way endorsed by Adf.ly to create this plugin. I did it for fun, and I am sharing it with you guys.**
What is Adf.ly?
Adf.ly is an advertising network based on links that are spread over the Internet. Unlike other ad networks we don’t need even a single pixel of your precious webpage space. We simply take care of your links. Every time a user clicks a link on your website we redirect him to an intermediate page with an ad, after five seconds he’s being taken to the destination URL.
What is AdflyPlugin?
Using AdflyPlugin, we can harness the power of Adf.ly. Whenever a link is put in chat, it is automatically converted to a Adf.ly link, using your API token(set in the config). Whenever someone clicks that link, it will open up a Adf.ly ad, and give you(Server owner) some money!
How do I set it up?
- Drag the AdflyPlugin-[version].jar into the "plugins" folder in your server
- Add Vault to Bukkit server (if using bukkit version)
- Restart your Bungee Cord Proxy or Bukkit server
- Create an account on Adf.ly
- Go to https://adf.ly/publisher/tools#tools-api, and copy your API token.
- Edit the config.yml to your liking, and save it.
- Restart your Bungee Cord Proxy or reload Bukkit
- Post a link in chat.
- enjoy ;)
Dependencies
How does it Work?
When someone posts a link in chat, the plugin will submit an API request to the Adf.ly website. It will use your token(from config) in the request, and it will return a shortened link, tied to your account, which will link to the originally posted link.
Permission
adfly.bypass - Anyone with this permission will not have their links shortened.
adfly.bypass.chat - Anyone with this permission will not have their links shortened in chat.
adfly.bypass.command - Anyone with this permission will not have their links shortened in commands.
Config
- api_token : This is your API token from the Adf.ly site. It will allow the links to be tied to your account, and give you money!
- uid_token: This is your UID token from the Adf.ly site. So all links can be tied to account
- ad_type: This specifies whether you want the normal wait 5 seconds, or display a banner on web page. (int=normal, banner=banner)
- api_domain: this is the domain to use for shortening URL, I would not change this unless you are sure what you are doing.
- url_list: this is the url list for the black or white list
- url_list_type: blacklist or whitelist.. Blacklist forces only those links to change; whitelist prevents those links to change.
- change_commands: This allows urls put in commands to be changed. Ex: (/msg test2 goto google.com) => Test sees (test1 -> test2: goto adf.ly/test)
- message: This is the message that is sent when a user types a url in chat or a command.
Config Example
adfly:
api_token: null
uid_token: 'null'
ad_type: int
api_domain: adf.ly
auto_reload: 'true'
url_list:
- adf.lys
- j.gs
- q.gs
- example.com/asd
url_list_type: whitelist
change_commands: 'true'
bukkit:
op_bypass: 'true'
message: "&a[&6ad&ff.ly&a] Sending message please wait..."Blacklist example
# This is the list, all links in this list will be forced to change
url_list:
#You can specify hosts (shown as adf.ly) or full urls (shown in 'example.com/asd')
- adf.ly
- j.gs
- q.gs
- example.com/asd
url_list_type: blacklistWhitelist example
# This is the list, all links in this list will be exempt from changing
url_list:
#You can specify hosts (shown as adf.ly) or full urls (shown in 'example.com/asd')
- adf.ly
- j.gs
- q.gs
- example.com/asd
url_list_type: whitelist
Supporting Me
There are 2 ways you can support me (CreepersHelp):
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
25MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.5MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
3.9MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta

