BossReferral [1.7/1.8/1.9/1.10] [MySQL/Flatfile]

 BossReferral [1.7/1.8/1.9/1.10] [MySQL/Flatfile] 2.1.0

BossReferral [1.7/1.8/1.9/1.10] [MySQL/Flatfile]
Tested Minecraft Versions: 1.7, 1.8, 1.9, 1.10
BossReferral
Stimulate your players to invite other players to your server!

What is BossReferral?

BossReferral is an referral plugin. You stimulate your players to invite other players to gain an certain reward. With the advanced configuration file and our message file its easy to change everything to your favorite things: Change public messages, rewards, settings etc. You also could implement some stats on your website because all data storage is done with MySQL!

Features
  • Let players refer new players using a code or their name.
  • See information about yourself or other players
  • See the top of referrers on your server
  • Rewards include: Console commands, money (requires Vault & Vault supported economy plugin), items (including type, amount, name, lore, enchantments).
  • Special rewards for milestones (eg 5 referrers)
  • Reload your configuration & languages file with one command
  • Highly customizable
  • Vault is an softdepend. If you want to include money in your rewards or limit the amount of refers by group, then this plugin needs to be installed and an Vault supported economy/permissions plugin. If you don't plan to use these features, then you won't need Vault and/or an Vault supported economy/permissions plugin.
  • MySQL or flatfile datastorage
  • Compatible with 1.7, 1.8, 1.9 and 1.10 servers
  • Placeholders for MVdWPlaceholderAPI
  • Leaderboards integration
Commands & Permissions

/brs generate
Generate a code that you can give to your newbie.
Permission: brs.generate

/brs codes
View a list of your active codes.
Permission: brs.codes

/brs redeemcode <code or playername>
Redeem an code. If you enabled the playername code, you will need to enter the player's name. If you didn't enable it, you will need to enter the code of the player that can be generated using the generatecode command.
Permission: brs.redeemcode

/brs referstats [playername]
View refer information about an certain player, including how mutch players he referred to your server and if he is referred by himself.
Permission: brs.referstats

/brs refertop <#top>
View a top list of players who referred the most players to your server, including place #, name and how mutch they invited.
Permission: br.refertop

/brsadmin reload
Reload the configuration and messages file.
Permission: brs.admin

/brsadmin load <playername>
Reload an online player from the database into the game.
Permission: brs.admin

/brsadmin loadall
Reload all online players from the database into the game.
Permission: brs.admin

/brsadmin save <playername>
Save that player into the database.
Permission: brs.admin

/brsadmin saveall
Save all online players into the database.
Permission: brs.admin

/brsadmin reset <playername>
Reset an (online) player.
Permission: brs.admin

/brsadmin resetall
WARNING: This will reset your whole table!
Permission: brs.admin

/brsadmin changeattr <playername> <isreferred, totalreferred> <<true, false>, <n>>
Change the player's attribute 'isReferred' or 'totalreferred' and store it in the database.
Permission: brs.admin

/brsadmin addcode <playername> <code>
Add a code to a player.
Permission: brs.admin

/brsadmin removecode <playername> <code>
Remove a code from the player
Permission: brs.admin

/brsadmin clearcodes <playername>

Clear all the player's codes.
Permission: brs.admin

/brsadmin clearsavedstacks <playername>
Clear all the player's saved stacks.
Permission: brs.admin

/brsadmin clearsavedcommands <playername>
Clear all the player's saved commands.
Permission: brs.admin

Note: The admin commands should in normal cases not be used. Things like saving and loading are automaticly done by the plugin.

<> --> Required parameters
[] --> Optional parameters

Configuration
The plugin comes with 2 files: config.yml and messages.yml. All the data is stored using MySQL.

Config.yml
This file is the general configuration file.

Code (Text):

Code:
data:
  # If you would like to use mysql as your storage method or not.
  # If true, you must provide the correct mysql-settings below.
  # If not, it will use file storage, which doesn't require configuration.
  use-mysql: true
  mysql-settings:
    # The host of your mysql server
    host: 'localhost'
    # The port of your mysql server
    port: 3306
    # The username to authenticate to your mysql server (must have access to the database below)
    user: 'bossreferrals'
    # The password to authenticate with the username
    password: 'secret'
    # The name of the database to use
    database: 'bossreferrals'

# Main settings of BossReferral
settings:
  # The default limit of how many you can officially refer through the plugin.
  default-max-referrals: 3
  # Specifiy group-based limits of how many you can officially refer through the plugin. Use -1 to disable the limit for that group.
  max-referrals-for:
    donator: 5
    moderator: 10
    admin: -1
  # The maximum amount of active codes a user can have on his account.
  max-active-codes: 10
  # The length of the code generated through /brs generate. Minimum of 8 is recommended
  code-length: 10
  # Allow players to be referred by someone else on the same ip address. It's recommended to keep this false.
  allow-same-ip-redeem: false
  # You can enable this to use player names instead of referral codes.
  use-player-names: false
  # Specify time in seconds before someone can execute the /brs redeemcode command. Set to 0 to disable.
  time-before-redeem: 0
  # Specify if some commands should have a small cooldown. It's recommended to keep this true.
  commands-cooldown: true
  # Specify your primary world name.
  primary-world-name: "world"
  # If false, commands under "execute-console-commands" will be directly executed on redeem wheter the player is online or not.
  # By having this true, the commands will be executed the first moment that player joins the game.
  # If you would like to execute commands on an online player, then this is recommended to be true.
  execute-commands-login: true

# Specify rewards for both the referrer and the newbie. Note that the convention of all the rewards (giving money, executing commands and giving items)
# is all the same. This means that even in this example one of the above is not specified, it doesn't mean it isn't supported. You can for example add a
# "giveitems" section under the referrer section.
rewards:
  # All rewards for the referrer
  referrer:
    # How many money to give to the referrer once someone is referred by this player.
    givemoney: 25
    # What console commands should be executed once someone is referred by this player.
    execute-console-commands:
    - "say %referrer% has invited %newbie% to this server! Welcome %newbie%"
    # You could optionally have a "giveitems" section here aswell. It should be in the same format as the default one under "newbie". See note above "rewards".
  newbie:
    # How many money to give to the newbie if he executes the /brs redeemcode command successfully.
    givemoney: 25
    # What items should be given to the newbie if he executes the /brs redeemcode command successfully. Remove this complete block to give no items.
    giveitems:
      # The item id
      267:
        # The amount of items to give
        amount: 1
        # (optional) The name of the item
        name: "&9Newbie's sword"
        # (optional) The lore of the item
        lore:
        - "&6This is an unique item."
        # (optional) Enchants of the item. To look up all enchantments, look at:
        # https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/enchantments/Enchantment.html
        enchantments:
          # The name of the enchantment, please look up the above document for all names.
          DAMAGE_ALL:
            # The level of the enchantment.
            level: 1
      # ... more items ...
  # Specials are certain rewards given if a milestone has been reached.
  specials:
    # Milestone: 5: Given if someone has referred 5 players. All rewards that you have seen above are also possible in this section.
    5:
      givemoney: 500
      execute-console-commands:
      - "say %referrer% has invited an total of 5 players!"
    # Milestone: 10: Given if someone has referred 10 players. All rewards that you have seen above are also possible in this section.
    10:
      givemoney: 1250
      execute-console-commands:
      - "say %referrer% has invited an total of 10 players!"
    # You can of course change the milestone's number, remove and/or add new milstones.




Messages.yml
You can change almost all messages here.

Code (Text):

Code:
commands:
  brs:
    general:
      players-only: "&cThis command is for players only."
      no-permission: "&cYou do not have permission to do this!"
      not-loaded: "&cIt seems like you are not loaded yet -- please wait a few seconds before trying this command again. If that doesnt solve this issue, please contact your server administrator."
      wait: "&cPlease wait 2 seconds between BossReferral commands."
    redeemcode:
      already-referred: "&cYou are already referred!"
      use-own-name: "&cYou can't use your own name!"
      redeem-localhost: "&cYou can't redeem an code from an localhost player!"
      redeem-early: "You can't redeem an code yet. You need to play at least %MINUTES% minutes before you can redeem an code."
      referrer-limited: "&cYour referrer has reached the maximum amount of refers!"
      player-doesnt-exist: "&cThat player does not exist!"
      use-own-code: "&cYou can't use your own codes!"
      code-doesnt-exist: "&cThat code does not exist!"
      redeem-successful-code: "&aYou have successfully redeemed the code!"
      redeem-successful-name: "&aYou have successfully redeemed the name!"
      inventory-full: "&cYour inventory is full and therefor your reward items are dropped under you!"
    help:
      help: "&aThis command gives more information about subcommands including an brief description and parameters."
      codes-disabled: "&cThis command is disabled on this server. Use player names instead."
      codes-enabled: "&aView an list of your current active codes."
      generate-disabled: "&cThis command is disabled on this server. Use player names instead."
      generate-enabled: "&aGenerate an new random code that you can use to refer someone."
      refertop: "&aSee the top player referrers. You can send an optional second parameter for the maximum place (eg 20). Second parameter must be an number."
      referstats: "&aSee statistics about an certain player or yourself. Optional second parameter must be the name of your target player."
      redeemcode-name: "Verify that you are referred by someone using their name. Second parameter must be your referrers name."
      redeemcode-code: "Verify that you are referred by someone using their code. Second parameter must be the code given by your referrer."
      reload: "&aReloads the configuration and all messages."
      not-found: "&cI didn't found that command. Please try again."
    referstats:
      not-found: "&cThat player does not exist in our database."
      name: "&7[&6BossReferral&7] &aName: &b%NAME%"
      referred: "&7[&6BossReferral&7] &aReferred: %REFERRED%"
      amount: "&7[&6BossReferral&7] &aAmount referred: &b%AMOUNT_REFERRED%"
      playing-since: "&7[&6BossReferral&7] &aPlaying since: &b%PLAYING_SINCE%"
    refertop:
      not-in-range: "&cPlease specify an amount between 1 and 25."
      layout: "&a%RANK%. %NAME% (%AMOUNT%)"
      not-number: "&cYour argument must be an number!"
    generate:
      codes-disabled: "&cCodes are disabled. Use your username instead."
      maximum-reached: "&cYou have reached the maximum amount of active codes!"
      new-code: "&aNew code created: &6%CODE%"
    codes:
      codes-disabled: "&cCodes are disabled. Use your username instead."
      no-codes: "&cYou have no active codes at this moment."
      layout-header: "&6You have &a%AMOUNT_CODES% &6codes available:"
      layout: "&a- %CODE%"
    usage:
      usage:
        - "&cUsage: /brs <codes, generate, refertop, referstats, redeemcode, ?>"
        - "&cFor more information about an command, execute:"
        - "&c/brs ? <subcommand>"
  brsadmin:
    general:
      no-permission: "&cYou do not have permission to do this!"
    reload:
      success: "&aSuccessfully reloaded configuration files!"
    load:
      wrong-args: "&cUsage: /brsadmin load <playername>"
      offline-player: "&cThat player is not online!"
      success: "&aSuccessfully loaded player!"
    loadall:
      success: "&aSuccessfully loaded all (online) players!"
    save:
      wrong-args: "&cUsage: /brsadmin save <playername>"
      offline-player: "&cThat player is not online!"
      success: "&aSuccessfully saved player!"
    saveall:
      success: "&aSuccessfully saved all online players!"
    reset:
      wrong-args: "&cUsage: /brsadmin reset <playername>"
      unknown-player: "&cPlayer not found!"
      success: "&aSuccessfully resetted that player!"
    resetall:
      success: "&aSuccessfully resetted all players!"
    changeattr:
      wrong-args: "&cUsage: /brsadmin changeattr <playername> <isreferred, totalreferred> <[true, false], [0-...]>"
      unknown-player: "&cPlayer not found!"
      boolean-parse-failed: "&cFailed to parse! The value must be 'true' or 'false'."
      integer-parse-failed: "&cFailed to parse! The value must be an integer. (0 --> ...)"
      unknown-attr: "&cCannot find that attribute!"
      success: "&aSuccessfully changed attribute!"
    addcode:
      wrong-args: "&cUsage: /brsadmin addcode <playername> <code>"
      success: "&aSuccessfully added the code."
      code-exists: "&cThat player already has that code."
      unknown-player: "&cCannot find that player!"
    removecode:
      wrong-args: "&cUsage: /brsadmin removecode <playername> <code>"
      success: "&aSuccessfully removed the code."
      code-doesnt-exists: "&cThat player doesnt has that code."
      unknown-player: "&cCannot find that player!"
    clearcodes:
      wrong-args: "&cUsage: /brsadmin clearcodes <playername>"
      success: "&aSuccessfully cleared all codes."
      unknown-player: "&cCannot find that player!"
    clearsavedstacks:
      wrong-args: "&cUsage: /brsadmin clearsavedstacks <playername>"
      success: "&aSuccessfully cleared all saved stacks!"
      unknown-player: "&cCannot find that player!"
    clearsavedcommands:
      wrong-args: "&cUsage: /brsadmin clearcommands <playername>"
      success: "&aSuccessfully cleared all saved commands!"
      unknown-player: "&cCannot find that player!"
events:
  join:
    items: "&aHere some extra items you got by referring other players!"
    inventory-full: "&cYour inventory is full and therefor an reward item is dropped under you!"
Code:
commands:
  brs:
    general:
      players-only: "&cThis command is for players only."
      no-permission: "&cYou do not have permission to do this!"
      not-loaded: "&cIt seems like you are not loaded yet -- please wait a few seconds before trying this command again. If that doesnt solve this issue, please contact your server administrator."
      wait: "&cPlease wait 2 seconds between BossReferral commands."
    redeemcode:
      already-referred: "&cYou are already referred!"
      use-own-name: "&cYou can't use your own name!"
      redeem-localhost: "&cYou can't redeem an code from an localhost player!"
      redeem-early: "You can't redeem an code yet. You need to play at least %MINUTES% minutes before you can redeem an code."
      referrer-limited: "&cYour referrer has reached the maximum amount of refers!"
      player-doesnt-exist: "&cThat player does not exist!"
      use-own-code: "&cYou can't use your own codes!"
      code-doesnt-exist: "&cThat code does not exist!"
      redeem-successful-code: "&aYou have successfully redeemed the code!"
      redeem-successful-name: "&aYou have successfully redeemed the name!"
      inventory-full: "&cYour inventory is full and therefor your reward items are dropped under you!"
    help:
      help: "&aThis command gives more information about subcommands including an brief description and parameters."
      codes-disabled: "&cThis command is disabled on this server. Use player names instead."
      codes-enabled: "&aView an list of your current active codes."
      generate-disabled: "&cThis command is disabled on this server. Use player names instead."
      generate-enabled: "&aGenerate an new random code that you can use to refer someone."
      refertop: "&aSee the top player referrers. You can send an optional second parameter for the maximum place (eg 20). Second parameter must be an number."
      referstats: "&aSee statistics about an certain player or yourself. Optional second parameter must be the name of your target player."
      redeemcode-name: "Verify that you are referred by someone using their name. Second parameter must be your referrers name."
      redeemcode-code: "Verify that you are referred by someone using their code. Second parameter must be the code given by your referrer."
      reload: "&aReloads the configuration and all messages."
      not-found: "&cI didn't found that command. Please try again."
    referstats:
      not-found: "&cThat player does not exist in our database."
      name: "&7[&6BossReferral&7] &aName: &b%NAME%"
      referred: "&7[&6BossReferral&7] &aReferred: %REFERRED%"
      amount: "&7[&6BossReferral&7] &aAmount referred: &b%AMOUNT_REFERRED%"
      playing-since: "&7[&6BossReferral&7] &aPlaying since: &b%PLAYING_SINCE%"
    refertop:
      not-in-range: "&cPlease specify an amount between 1 and 25."
      layout: "&a%RANK%. %NAME% (%AMOUNT%)"
      not-number: "&cYour argument must be an number!"
    generate:
      codes-disabled: "&cCodes are disabled. Use your username instead."
      maximum-reached: "&cYou have reached the maximum amount of active codes!"
      new-code: "&aNew code created: &6%CODE%"
    codes:
      codes-disabled: "&cCodes are disabled. Use your username instead."
      no-codes: "&cYou have no active codes at this moment."
      layout-header: "&6You have &a%AMOUNT_CODES% &6codes available:"
      layout: "&a- %CODE%"
    usage:
      usage:
        - "&cUsage: /brs <codes, generate, refertop, referstats, redeemcode, ?>"
        - "&cFor more information about an command, execute:"
        - "&c/brs ? <subcommand>"
  brsadmin:
    general:
      no-permission: "&cYou do not have permission to do this!"
    reload:
      success: "&aSuccessfully reloaded configuration files!"
    load:
      wrong-args: "&cUsage: /brsadmin load <playername>"
      offline-player: "&cThat player is not online!"
      success: "&aSuccessfully loaded player!"
    loadall:
      success: "&aSuccessfully loaded all (online) players!"
    save:
      wrong-args: "&cUsage: /brsadmin save <playername>"
      offline-player: "&cThat player is not online!"
      success: "&aSuccessfully saved player!"
    saveall:
      success: "&aSuccessfully saved all online players!"
    reset:
      wrong-args: "&cUsage: /brsadmin reset <playername>"
      unknown-player: "&cPlayer not found!"
      success: "&aSuccessfully resetted that player!"
    resetall:
      success: "&aSuccessfully resetted all players!"
    changeattr:
      wrong-args: "&cUsage: /brsadmin changeattr <playername> <isreferred, totalreferred> <[true, false], [0-...]>"
      unknown-player: "&cPlayer not found!"
      boolean-parse-failed: "&cFailed to parse! The value must be 'true' or 'false'."
      integer-parse-failed: "&cFailed to parse! The value must be an integer. (0 --> ...)"
      unknown-attr: "&cCannot find that attribute!"
      success: "&aSuccessfully changed attribute!"
    addcode:
      wrong-args: "&cUsage: /brsadmin addcode <playername> <code>"
      success: "&aSuccessfully added the code."
      code-exists: "&cThat player already has that code."
      unknown-player: "&cCannot find that player!"
    removecode:
      wrong-args: "&cUsage: /brsadmin removecode <playername> <code>"
      success: "&aSuccessfully removed the code."
      code-doesnt-exists: "&cThat player doesnt has that code."
      unknown-player: "&cCannot find that player!"
    clearcodes:
      wrong-args: "&cUsage: /brsadmin clearcodes <playername>"
      success: "&aSuccessfully cleared all codes."
      unknown-player: "&cCannot find that player!"
    clearsavedstacks:
      wrong-args: "&cUsage: /brsadmin clearsavedstacks <playername>"
      success: "&aSuccessfully cleared all saved stacks!"
      unknown-player: "&cCannot find that player!"
    clearsavedcommands:
      wrong-args: "&cUsage: /brsadmin clearcommands <playername>"
      success: "&aSuccessfully cleared all saved commands!"
      unknown-player: "&cCannot find that player!"
events:
  join:
    items: "&aHere some extra items you got by referring other players!"
    inventory-full: "&cYour inventory is full and therefor an reward item is dropped under you!"

MVdWPlaceholders
br_codes
Amount of codes the player has.
br_isreferred
If the player is referred or not.
br_totalreferred
Amount of players the player has referred.
br_playingsince
Since when this player is playing.
br_firstcode
First code available for this player.

Already planned for next release:

  • Let me know!

Support/Questions
Contact me here on SpigotMC.

I am the only developer of this project, and it takes me alot of time to test everything, for example to test the whole configuration for possible things that aren't protected for errors. If you see an error, please contact me so I can directly fix this issue. I promise that I will fix issues as quick as possible.

If you have an idea, you can always let me know. I will try to implement this feature if it has something todo with the main project: Referring people to your server. I can't promise that the update will come directly in the plugin, because I also have other projects, but I will do my best.

Latest reviews

thanks for the leak :))) :D
MikeyBoy
MikeyBoy
xD Thx for the review and plugin.

Similar resources

AdvancedModreq [Player Ticket Management] - GUI - MySQL - Notifications MikeyBoy
Notify, Reply, Flag, Rate, Close and Resolve reports submitted by players! View tickets through UI!
0.00 star(s) 0 ratings
Downloads
90
Updated
AdvancedModreq [Player Ticket Management] - GUI - MySQL - Notifications cqnfuse
Notify, Reply, Flag, Rate, Close and Resolve reports submitted by players! View tickets through UI!
1.00 star(s) 1 ratings
Downloads
73
Updated
AdvancedModreq [Player Ticket Management] - GUI - MySQL - Notifications - HelpOP Dekomori
Notify, Reply, Flag, Rate, Close and Resolve reports submitted by players! View tickets through UI!
0.00 star(s) 0 ratings
Downloads
652
Updated
BlackSpigot General Chat
Rules Help Users
    T @ tijolinho: @BlackSpigot.com send pv
    Top