*** Due to unwise and scummy decisions by Curse, my Bukkit Dev account will be inaccessible starting March 1st, 2018. Thus, I can no longer update any of my plugins here on the Bukkit Dev site. Please find the new repo for this plugin at the excellent SpigotMC site: https://www.spigotmc.org/resources/simplereferral.53629/ ***
What is it?
SimpleReferral makes referring players as easy and straightforward as can be. Simply enter your friend's name into the only command and you're done - there's no hassle with referral codes and all that curmudgeonry. When your friend joins the server, you'll both get rewarded.
------------------------
Built for CraftBukkit/Spigot 1.12.X. It should be compatible with all 1.8+ versions.
------------------------
Setup
- Download the JAR to your plugins directory. Self explanatory for GUIs. For those using an Ubuntu/Debian terminal, use "wget jarurl" with the url to the jar file (go to the Files tab) in quotes. If you don't have access to the terminal the host is managing, you can try to use an FTP program to connect via SFTP and upload the jar file.
- PLEASE SCROLL DOWN THE BOTTOM OF THIS POST FOR THE DEFAULT CONFIG! SPIGOT IS KNOWN TO WIPE THE COMMENTS IN THE AUTOMATICALLY-DEPLOYED DEFAULT CONFIG FILE!
Configuration
- Only one USER-EDITABLE file in the data folder: config.yml
- All the variables in the config are explained via comments
- Valuetypes for config variables are indicated via comments
- This plugin will generate a savedata.yml file that stores referral information, such as pending referrals and referral history. It is recommended that you do not modify this file! If you wish to wipe the pending referrals and the referral history of your server, simply delete the file.
Commands/How to Use
Command | Description | Permission Node | Default Perm |
---|---|---|---|
/refer <player-name> | Refer a friend to the server | simplereferral.refer | true |
/myrefer | View a list of your successful referrals | simplereferral.myrefer | true |
/allrefer |
View all successful referrals on this server | simplereferral.allrefer | op |
/srefReload |
Reload the SimpleReferral config from disk |
simplereferral.srefReload |
op |
You can use tab to autocomplete player names for /refer
Configuration Features
- Specify how long a pending referral is valid for
- Specify a cooldown period between referring players
- Reward any combination of ingame currency, items, and/or xp for successful referrals
- Automatically grant players a permission upon successfully referring a certain number of players (e.g. "Advertiser" tag in chat)
Default Config
# How long will a referral exist for until it expires
# This value is in HOURS, but you can specify decimal values
ExpireHours: 24
# What type of reward should be given for referring a player?
# You can enable any combination of "money", "item", and "xp"
# If you enable "money", you must have an economy plugin & Vault installed!
EnableMoneyRewardType: true
EnableItemRewardType: false
EnableXPRewardType: false
# How long must players wait between creating referrals?
# This helps prevent spam and potential crashing of your server from command bots
# This value is in MINUTES, but you can specify decimal values
ReferralCooldown: 3
# Should the server publicly announce when a referral expires?
AnnounceExpiredReferrals: false
# ------------- Money Reward Options ------------- #
# How much the one who refers the other is rewarded
MoneyReferrerRewardAmount: 123.45
# How much the one who is referred is rewarded
MoneyReferreeRewardAmount: 100.00
# ------------- -------------------- ------------- #
# ------------- Item Reward Options ------------- #
# You must specify a MATERIAL (not numerical ID) for item type!
# Referrer reward
ItemReferrerRewardType: GOLD_INGOT
ItemReferrerRewardAmount: 36
# Referee reward
ItemReferreeRewardType: GOLD_INGOT
ItemReferreeRewardAmount: 32
# ------------- ------------------- ------------- #
# ------------- XP Reward Options ------------- #
# Referrer reward
XPReferrerRewardAmount: 42
# Referee reward
XPReferreeRewardAmount: 40
# ------------- ----------------- ------------- #
# -------------------------- Permission Reward -------------------------- #
# You can grant players a permission for referring a certain number of players
# This is useful if you have an "Advertiser" or similar badge on your server
# For a referral to count, the referree must join the server!
# Whether the perm reward is enabled or not
EnablePermReward: false
# Permission to be rewarded
PermReward: mypermmanager.groups.advertrank
# How many referrals the player must reach in order to receive the reward
PermRewardCount: 15
# -------------------------- ----------------- -------------------------- #