Updates README, renames paymentDelay
Renames paymentDelay to payoutDelay for consistency Adds permission information to the README Adds information about player time tracking to the README
This commit is contained in:
parent
b91858ad2d
commit
db922f7351
14
README.md
14
README.md
@ -11,6 +11,10 @@ The logic for which payout is used is as follows:
|
||||
- If a payout is set for one or more of a player's group, the highest value will be used.
|
||||
- If none of the above apply, the base pay is used.
|
||||
|
||||
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
|
||||
@ -57,8 +61,16 @@ This command is used to override the payout for a specific group.
|
||||
| Option | Type | Description |
|
||||
|-----------------------|--------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||
| defaultPayout | decimal number | The amount of currency to pay by default |
|
||||
| paymentDelay | number | The amount of minutes to wait between each payout |
|
||||
| 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 |
|
||||
|
||||
## Permissions
|
||||
|
||||
| Permission | Description |
|
||||
|--------------------|----------------------------------------|
|
||||
| timeismoney.* | Grants all permissions |
|
||||
| timeismoney.reload | Allows usage of the reload command |
|
||||
| timeismoney.admin | Allows usage of configuration commands |
|
@ -128,7 +128,7 @@ public final class PlayerPayouts extends JavaPlugin {
|
||||
if (lastPaid == null) {
|
||||
continue;
|
||||
}
|
||||
if ((System.currentTimeMillis() - lastPaid) / 60000 < configuration.getPaymentDelay()) {
|
||||
if ((System.currentTimeMillis() - lastPaid) / 60000 < configuration.getPayoutDelay()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ public class Configuration {
|
||||
private final double defaultPayout;
|
||||
private final int hoursUntilBonus;
|
||||
private final double bonusMultiplier;
|
||||
private final int paymentDelay;
|
||||
private final int payoutDelay;
|
||||
private final double afkPercentage;
|
||||
private final boolean displayPaymentMessage;
|
||||
|
||||
@ -54,7 +54,7 @@ public class Configuration {
|
||||
this.defaultPayout = fileConfiguration.getDouble(ConfigurationKey.DEFAULT_PAYOUT.getPath(), 10);
|
||||
this.hoursUntilBonus = fileConfiguration.getInt(ConfigurationKey.HOURS_UNTIL_BONUS.getPath(), 100);
|
||||
this.bonusMultiplier = fileConfiguration.getDouble(ConfigurationKey.BONUS_MULTIPLIER.getPath(), 1);
|
||||
this.paymentDelay = fileConfiguration.getInt(ConfigurationKey.PAYMENT_DELAY.getPath(), 60);
|
||||
this.payoutDelay = fileConfiguration.getInt(ConfigurationKey.PAYOUT_DELAY.getPath(), 60);
|
||||
this.afkPercentage = fileConfiguration.getDouble(ConfigurationKey.AFK_PERCENTAGE.getPath(), 0);
|
||||
this.displayPaymentMessage = fileConfiguration.getBoolean(ConfigurationKey.DISPLAY_PAYMENT_MESSAGE.getPath(), true);
|
||||
}
|
||||
@ -128,8 +128,8 @@ public class Configuration {
|
||||
*
|
||||
* @return <p>The delay between payments</p>
|
||||
*/
|
||||
public int getPaymentDelay() {
|
||||
return paymentDelay;
|
||||
public int getPayoutDelay() {
|
||||
return payoutDelay;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -182,8 +182,8 @@ public class Configuration {
|
||||
* Saves this configuration to disk
|
||||
*/
|
||||
public void save() {
|
||||
fileConfiguration.set(ConfigurationKey.PAYMENT_DELAY.getPath(), this.paymentDelay);
|
||||
fileConfiguration.setComments(ConfigurationKey.PAYMENT_DELAY.getPath(),
|
||||
fileConfiguration.set(ConfigurationKey.PAYOUT_DELAY.getPath(), this.payoutDelay);
|
||||
fileConfiguration.setComments(ConfigurationKey.PAYOUT_DELAY.getPath(),
|
||||
List.of("The amount of minutes to wait between each payment"));
|
||||
|
||||
fileConfiguration.set(ConfigurationKey.BONUS_MULTIPLIER.getPath(), this.bonusMultiplier);
|
||||
@ -202,8 +202,8 @@ public class Configuration {
|
||||
fileConfiguration.setComments(ConfigurationKey.AFK_PERCENTAGE.getPath(),
|
||||
List.of("The percentage of their normal payout to pay AFK players"));
|
||||
|
||||
fileConfiguration.set(ConfigurationKey.PAYMENT_DELAY.getPath(), this.paymentDelay);
|
||||
fileConfiguration.setComments(ConfigurationKey.PAYMENT_DELAY.getPath(),
|
||||
fileConfiguration.set(ConfigurationKey.PAYOUT_DELAY.getPath(), this.payoutDelay);
|
||||
fileConfiguration.setComments(ConfigurationKey.PAYOUT_DELAY.getPath(),
|
||||
List.of("The amount of minutes to wait between each payment"));
|
||||
|
||||
fileConfiguration.set(ConfigurationKey.HOURS_UNTIL_BONUS.getPath(), this.hoursUntilBonus);
|
||||
|
@ -22,7 +22,7 @@ public enum ConfigurationKey {
|
||||
/**
|
||||
* The amount of minutes between each payout
|
||||
*/
|
||||
PAYMENT_DELAY("paymentDelay"),
|
||||
PAYOUT_DELAY("payoutDelay"),
|
||||
|
||||
/**
|
||||
* The percentage of the payment to pay AFK players
|
||||
|
@ -1,7 +1,7 @@
|
||||
# The default payout if the player has no overrides
|
||||
defaultPayout: 10
|
||||
# The amount of minutes to wait between each payment
|
||||
paymentDelay: 60
|
||||
# The amount of minutes to wait between each payout
|
||||
payoutDelay: 60
|
||||
# Whether to announce to a player that they've just been paid
|
||||
displayPaymentMessage: true
|
||||
# The amount of hours until a bonus is given. Set to -1 to disable.
|
||||
|
Loading…
Reference in New Issue
Block a user