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:
2024-01-09 11:58:12 +01:00
parent b91858ad2d
commit db922f7351
5 changed files with 25 additions and 13 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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

View File

@ -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.