src/main | ||
.gitignore | ||
pom.xml | ||
README.md |
Player Payouts
This Spigot plugin gives players customizable payouts based on their played in-game time. A unique feature of this plugin is a configurable bonus once players reach a specified total play-time on the server. The plugin is highly configurable. You can alter the base payout per-group or per-player, you can adjust how often players are paid, how big a percentage is paid to AFK players and whether players are alerted upon receiving a payout.
You can configure how the base pay is combined from the four components of: the base payout, the highest group payout, the sum of group payouts and the player payout. You can combine several, or have some as fallback if the others aren't set.
Once a second, any players that have played longer than the specified payout delay are paid, and their internally tracked playtime is reset. This is an improvement over plugins that simply pay players on a set delay, as that just ends up being a game of chance. If you are lucky, you are paid immediately after joining, which doesn't seem fair.
Dependencies
Required
- Vault (A vault-compatible economy plugin is required. A vault-compatible permission is necessary for per-group payments)
Optional
- EssentialsX (Necessary for checking if a player is AFK)
Commands
Command | Arguments | Description |
---|---|---|
/playerpayouts:reload | Reloads the configuration file from disk | |
/setgrouppayout | Sets the payout for a specific group | |
/setplayerpayout | Sets the payout for a specific player |
Note that for the set payout commands, you can use "null", "clear" or "none" to remove a payout you previously set.
/setgrouppayout
This command is used to override the payout for a specific group.
/setgrouppayout <group> <payout>
Argument | Usage |
---|---|
group | The name of the group to specify the payout for |
payout | The decimal number denoting how much of the currency players in the group should be paid, or "clear" to unset a previous value. |
/setplayerpayout
/setplayerpayout <player> <payout>
Argument | Usage |
---|---|
player | The name or UUID of the player to specify the payout for |
payout | The decimal number denoting how much of the currency the player should be paid, or "clear" to unset a previous value. |
Configuration options
Option | Type | Description |
---|---|---|
defaultPayout | decimal number | The amount of currency to pay by default |
payoutDelay | number | The amount of minutes to wait between each payout |
displayPaymentMessage | true / false | Whether to display a message to the player each time a player receives a payout |
hoursUntilBonus | number / -1 | The amount of hours a player must play until they start receiving a payout bonus, or -1 to disable the feature |
bonusMultiplier | decimal number | A multiplier used to increase or decrease the time bonus ((hours played / hours until bonus) * bonusMultiplier) + payout |
afkPercentage | percentage (0-100) | The percentage of their normal payout to pay AFK players |
payoutRules | special string | The rules for how a player's base pay (before the bonus multiplier) is calculated. See this section |
payoutRules
The rules for how the base payout is calculated. "," = OR, "+" = AND. "p" or "player" is the override for a specific player. "g" or "groups" is the sum of all group overrides for a specific player. "hg" or "HighestGroup" is the highest sum of all of a specific player's groups. "b" or "base" is the default base payment.
If you wanted to give players the sum of everything, you'd set it to "p+g+b", which is read as "player override and sum of group overrides + base payout". If you wanted to give players the sum of their personal override and their highest group, but fall back to the base pay, you'd set it to: "p+hg,b" (personal override and highest group override, or the base payout). If the payout rule you set ends up giving 0 as the payment, it will fall back to the default of "p,hg,b" ( player override, or highest group override, or base payout)
Permissions
Permission | Description |
---|---|
playerpayouts.* | Grants all permissions |
playerpayouts.reload | Allows usage of the reload command |
playerpayouts.admin | Allows usage of configuration commands |