Config
ReferIO creates the config file ReferIO.cfg
in your config folder.
ReferIO has multiple Config options:
referTimeout
The time a pending referal exists in seconds.
Default is 604800 seconds = one week.
Set to 0 do disable timeouts.
maxPendings
The maximum amount of pending requests a player can have.
Default is 5.
Set to 0 if you want do disable this limit.
maxRefers
The maximum amount of requests a player can generate overall.
Default is 10.
Set to 0 if you want do disable this limit.
playTimeUntilReward
The timespan in seconds the referred player has to be online until rewards get unlocked.
Default is 1800 seconds = 30 minutes.
rewardCommands
A list of commands that will be executed ("the reward"). Put your rewarding commands in here. The commands will be executed as the server. You can use %referer
for the user that invited the new player and %referred
for the new player. It doesn't matter if you use a slash at the beginning of a command or not.
Example:
S:rewardCommands <
give %referred minecraft:steak 1
/msg %referer %referred got his reward, thank you for increasing the community!
>
When thisthe commands will be triggered you can be sure that the refferedreferred player is online. The referer on the other hand might be offline. If you want a command to be run when the the referer is online for sure, use ?
in front of your command. Keep in mind that the referred player might be offline at that time.
keyLength
The length of the generated alphanumeric referal key.
Default is 5 letters.
The key is alphanumeric, meaning that there are in total 62 letters to be used.
Therefore your amount of keys is 62n with n as the key length.
Used keys will be re-used.
Keep in mind that you should always have enough keys so calculate with a buffer.
If you run out of keys the mod will crash!
Example Config
# Configuration file
general {
# The length of the generated key [range: 1 ~ 2147483647, default: 5]
I:keyLength=5
# The maximum amount of pending requests a player can have [range: 0 ~ 2147483647, default: 5]
I:maxPendings=5
# The maximum amount of requests a player can generate [range: 0 ~ 2147483647, default: 10]
I:maxRefers=10
# The timespan the player has to be online until rewards get unlocked [range: 0 ~ 2147483647, default: 1800]
I:playTimeUntilReward=1800
# The time a pending referal exists [range: 0 ~ 2147483647, default: 604800]
I:referTimeout=604800
# List of commands that will be executed as reward. [default: [give %referred minecraft:steak 1], [msg %referer %referred got his reward, thank you for increasing the community!]]
S:rewardCommands <
give %referred minecraft:steak 1
msg %referer %referred got his reward, thank you for increasing the community!
>
}