PlayerReferrals is a plugin that allows your players to refer other players in order to receive rewards!
Some of the features this plugin contains:
Give different rewards to referrer and referred player
Offline player support: players do not have to be online to receive their rewards
Create milestones, at which players will receive additional rewards
MySQL & SQLite support
Stop players with the same IP from referring each other
Set a maximum playtime limit, after which players cannot receive rewards anymore to prevent abuse
Customizable messages
Commands:
/referral <player> - Main command for PlayerReferrals, gives rewards to player executing the command and player specified
/referral - See your referral score and how much time you have remaining to enter a referral name
/referralleaderboard - See the top 10 players with the highest referral score
/referraladmin help - Help command for the admin commands
/referraladmin check <player> - Check the amount of referrals a player has and who they were referred by
/referraladmin set <player> <value> - Set the referral score of a player to a value
/referraladmin adjust <player> <value> - Adjust the referral score of a player using positive or negative numbers
/referraladmin reset <player> - Resets the referrer of a player, does not alter their score
/referraladmin about - Information about the plugin
Permissions are very simple:
playerreferrals.referral - Main referral command, set to everyone by default
playerreferrals.admin.command - For main admin command
playerreferrals.admin.check - /refadmin check
playerreferrals.admin.set - /refadmin set
playerreferrals.admin.adjust - /refadmin adjust
playerreferrals.admin.reset - /refadmin reset
playerreferrals.admin.reload - /refadmin reload
playerreferrals.admin.about - /refadmin about
%playerreferrals_referrerign% - The username of the player they have been referred by
%playerreferrals_score% - The referral score of the player
%playerreferrals_minutesremaining% - The amount of minutes remaining to put in a referral name
Code (YAML):
# Don't change this config-version: 1.0
# Please keep this on <3 bStats: true
# ALL PLACEHOLDERS ARE CASE-SENSITIVE
# Type of database to use, choose SQLITE for a local database and MYSQL if you use a MYSQL database database-type: SQLITE
# This will only be used if you use MYSQL as database-type host: localhost
port: 3306
database: database
username: username
password: password
table-prefix: 'ref_'
# If true, players are able to refer each other refer-each-other: false
# If enabled, will log the ip of players once they join and makes sure players can not be referred by someone with the same IP address # I strongly recommend using this in combination with a VPN blocker of your choice, to prevent easily bypassing this. ip-check: true
# Global rewards a player will receive when they referred another player, milestones can be set further down the config file # Commands will be executed by the console # Placeholders: %username%, %score%, %referredUsername% referral-rewards:
commands: -
"eco give %username% 50" message: "&3You referred &b%referredUsername% &3and have received rewards! Your current score is &b%score%&3."
# Rewards a player will receive when they get referred by another player # Commands will be executed by the console # Placeholders: %username%, %referralUsername% referred-rewards:
commands: -
"eco give %username% 25" message: "&bYou &3and &b%referralUsername% &3have both received rewards!"
# Milestones allow you to give special rewards once a player reaches a certain referral-score # Placeholders: %username%, %score% enable-milestones: true
milestones:
5:
commands: -
"eco give %username% 100" message: "&3You reached &b%score% &3and have received additional rewards!"
# To disable this, use -1 minutes-allowed: 60
# Set to false to disable the /referralleaderboard enable-leaderboard: true
Code (YAML):
prefix: "&8[&3PlayerReferrals&8] " nonplayer: "This command can only be used by a player, for admin commands please use /referraladmin"
# --------------------------------------------------- # ALL PLACEHOLDERS ARE CASESENSITIVE # ---------------------------------------------------
# In order to remove sections, simple comment the line and it won't be displayed.
# The following placeholders can be used in the messages below: # %username% - The username of the player executing the command # %score% - The score of the player executing the command # %referrerUsername% - The username of the player they have been referred by # %minutesRemaining% - The amount of minutes the player has remaining to enter a username
# All the messages below are from the /referral command. They can be seen by all players
# Only the appropriate sections will be shown, for example: referred will not be shown if the player has not been referred by someone. referral:
score: "&3Your referral score is &b%score%" referred: "&3You have been referred by: &b%referrerUsername%" no-refer: "&3You did not enter a referral username." explanation: "&3If you have been referred by someone, you have &b%minutesRemaining% minutes &3remaining to put in a referral code using &B/referral <username>" already-referred: "&3You have already been referred by &b%referrerUsername% &3and cannot enter another user" out-of-time: "&3Unfortunately, you have run out of time to enter a referral code. Sorry!" refer-self: "&3You cannot get referred by yourself..." refer-by-referrer: "You cannot be referred by someone who got referred by you." player-not-exist: "&3That player has never joined before." ip-match: "&3You cannot be referred by someone with the same IP address"
# All the messages below are from the /referraladmin command. They can be seen by players with access to this command.
# The following placeholders can be used in the messages below: # %username% - The username of the specified player # %score% - The score of the specified player # %referrerUsername% - The username of the player they have been referred by
# Only the appropriate sections will be shown, for example: referred-yes will not be shown if the player has not been referred by someone. check:
score: "&3Score: &b%score%" referred-no: "&b%username% &3has not been referred by anyone" referred-yes: "&3They have been referred by &b%referrerUsername%" admin-check-no-player-found: "&3No player was found by that name." admin-set-no-player-found: "&3No player was found by that name." admin-adjust-no-player-found: "&3No player was found by that name." admin-reset-no-player-found: "&3No player was found by that name." admin-reset-success: "&3The referral status of &b%username% &3has been reset. (Not their score)" admin-set-success: "&3The score of &b%username% &3has been set to &b%score%"
# %value% - Adjustment value specified admin-adjust-success: "&3The score of &b%username% &3has been adjusted by &b%value%&3, their score is now &b%score%"
# No placeholders are allowed in the messages below admin-check-usage: "&3Usage: /referraladmin check <player>" admin-set-usage: "&3Usage: /referraladmin set <player> <score>" admin-adjust-usage: "&3Usage: /referraladmin adjust <player> <value>" admin-reset-usage: "&3Usage: /referraladmin reset <player>" admin-no-permission: "&cYou don't have permission to execute this command." referrerign-placeholder-empty: "Nobody"