Referrals - Let your users refer other players to your server, and get rewards for doing so!

This is a discussion topic for the Ore project, Referrals. View the full project on Ore for downloads and more information.


Referrals Logo

A Referrals plugin for Sponge

Commands:

Command Usage Example Aliases
/referrals main command, shows the help menu /referrals None
/referrals top [#] Used to show the top referrers on the server, defaults to 10 if no number is provided /referrals top 10 /referrals top/t
/referrals check [name] Used to show the amount of players the provided player has referred, defaults to the player sending the message if no name is listed. /referrals check BranFlakes /referrals check/chk
/referrals thanks [name] Used to thank another player for referring you /referrals thanks BranFlakes /referrals thanks/thank
/referrals help Basic help command to show all command usage /referrals help /referrals help/h

Permissions:

Permission Description
referrals.check allows a user to use the check command
referrals.check.self allows a user to use the check command on themselves
referrals.check.other allows a user to use the check command on others
referrals.top allows a user to view the top referrers on a server

Config:

#set the command to execute for a reward
rewardActions {
  # Set the command(s) that should execute on a successful referral
  # do not use a '/' in the command
  # %p = player name
  # example provided below
  # EXAMPLES:
  # referredRewardCommand = ["msg %p Thanks for using Referrals!", "msg %p Make sure to refer other players!"]
  # milestoneCommands = ["1:::msg %p Thanks for referring 1 player!","5:::msg %p Thanks for referring 5 players!"]
  #
  referrerRewardCommand = ["msg %p Thanks for using Referrals!", "msg %p Make sure to refer other players!"]
  referredRewardCommand = ["msg %p Thanks for using Referrals!", "msg %p Make sure to refer other players!"]
  # Split by [Number referred]:::[Command to execute]
  milestoneCommands = ["1:::msg %p Thanks for referring 1 player!",
    "5:::msg %p Thanks for referring 5 players!",
    "10:::msg %p Thanks for referring 10 players!",
    "15:::msg %p Thanks for referring 15 players!",
    "20:::msg %p Thanks for referring 20 players!"]
  globalCommands = [""]
}

# set which player(s) should receive rewards
rewardPlayers {
  # if true, player will receive rewards for a successful referral action
  # default is true (Both the referred player, and the player that referred them will receive rewards)
  referrer = true
  referred = true
}

# set which players or actions should trigger on a referral
rewardConfig {
  # If true, the referrer will receive a reward
  referrerReward = true
  # If true, the referred player will receive a reward
  referredReward = true
  # If true, players will receive milestone rewards for referring players
  milestoneRewards = true
  # If true, global commands will be triggered during a referral
  globalCommand = false
}

Source

Other Contributers:

1 Like

A new version has been released for Referrals, it is available for download here.


  • Fixed an issue with the /referrals help command executing rewards

A new version has been released for Referrals, it is available for download here.


Small fix replicated from another area the help command was called as with 1.0.1

1 Like

Works on API7? 1.12. x :confused:

There isn’t any harm in just installing the plugin and testing functionality.

Victor_Alonso, I just tested it with API 7 and 1.12.2 and it does work. Ill probably create a new branch on the source repo in a few days that I will continue to update for API 7.

Here is a link to that new branch, although it won’t currently contain any code that is different from the current branch aside from some gradle build information, and I highly doubt it will have to aside from that build file.

A new version has been released for Referrals, it is available for download here.


A few permissions were added in this version

/referrals check

referrals.check (allows a user to use the check command)

referrals.check.self (allows a user to use the check command on themselves)

referrals.check.other (allows a user to use the check command on others)

/referrals top

referrals.top (allows a user to view the top referrers on a server

1 Like

A new version has been released for Referrals, it is available for download here.


Updated new command usage:
Help: help, h
Check: check, chk
Thanks: thanks, thank
Top: top, t


Changed text to “Referrals” instead of Spigot name “Referme”


Import cleanup

1 Like

I see in the config you can set it up so both the referrer and referee receive reward. Any chance of setting up different rewards for each? Like I could give basic tools or something for the referred player and give diamonds to the player who referred him? Just a thought

1 Like

Oh! I didn’t even think of that when first creating it. I’ll see what I can do tonight or this weekend and get that change implemented. Thanks for the idea!

A new version has been released for Referrals, it is available for download here.


Version 1.3 update

New Features:

  • Allow different rewards for Referrer and Referred players!
  • Commands now support tab completion

Update Warnings! :

  • Please backup your config file before updating, after backing up please remove your old config file and the plugin will generate the new config file.

OR

  • you can paste the new config from the README file on github, or the plugin description page into your old file and adjust the values from there.

Other notes:

  • Changed commands to take User type
  • Rewrote check and thanks commands to use User type
  • Restructured database connection manager
  • Fixed a bug where an incorrectly capitalized name would not return results
1 Like

Hello, is it possible to include a broadcast as well as the private messages that it sends or, has anybody found a way to do this?

Are multiple reward commands possible?

Also would it be possible to use it on a bungee? (Like over several different sponge servers)

Hey SeeMeRise,

I can look into adding a optional broadcast message for server owners to turn on or off in the config. Sorry this took so long to respond to. You can also create an issue on the github repo and I will be able to track it there.

Hey BrainStone,

I can look into adding in multiple commands, or even a list of commands to execute when a referral is given. As for bungee, I am not quite sure as I have never dealt with it before, and since this runs on an H2 database rather than MySQL it wouldn’t be able to share a database with another server. I can look into allowing MySQL as an option and then Referrals would carry across servers that use the same database.

As for Thanking a player on another server, I am not quite sure how that would work.

Do you have any ideas on how you would like to see this implemented? I am pretty open for suggestions since I haven’t planned this yet.

what about adding milestone rewards? ie. 5 referrals/25 referrals/etc

That’s a really good idea! I will definitely look into that when I get time to update again.

Hi Brian,

One thing that i have realised with this plugin is that people should only really be able to run the thank command once as in 99% of cases a singular person would have referred this user however it doesnt seem that way (from my testing) can you confirm if this is meant to happen or if you are meant to be able to run the command multiple times?

Thanks

A new version has been released for Referrals, it is available for download here.


Fixed a bug in which the ‘referred’ player’s account was not being created in the database allowing for players to continually spam the /referral thanks command until they had been labelled as a referrer.

Accounts are now correctly created when a user referrers another user.

such a nice plugin. a few questions:
• Can you do multiple commands being run? In case i wanna send a gift and broadcast it as well.
• Can you add requirements to the reffered players? eg Playtime in Seconds