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