This is a discussion topic for the Ore project, Referrals. View the full project on Ore for downloads and more information.
Referrals
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
}
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.
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
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!
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.
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.
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?
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