mirror of
https://github.com/zontreck/AutoMoneyPlugin
synced 2025-06-19 02:13:55 +00:00
Add a verbose flag
This commit is contained in:
parent
fd73d47d3a
commit
4cdb0f48c0
3 changed files with 10 additions and 2 deletions
|
@ -30,6 +30,7 @@ public class AutoMoneyPlugin extends JavaPlugin {
|
|||
Configuration.g_dPaymentAmount = getConfig().getDouble("amountToGive", 0.25);
|
||||
Configuration.g_iPaymentInterval = getConfig().getInt("duration", 60);
|
||||
Configuration.g_sBankAccount = getConfig().getString("bank", "");
|
||||
Configuration.g_bVerbose = getConfig().getBoolean("verbose", false);
|
||||
|
||||
// Setup the economy
|
||||
if (!setupEconomy()) {
|
||||
|
@ -62,6 +63,9 @@ public class AutoMoneyPlugin extends JavaPlugin {
|
|||
@Override
|
||||
public void run() {
|
||||
if(Configuration.PaymentEnabled()) {
|
||||
if(Configuration.g_bVerbose) {
|
||||
getLogger().info("Paying all online players " + Configuration.g_dPaymentAmount);
|
||||
}
|
||||
// Pay all online players
|
||||
getServer().getOnlinePlayers().forEach(player -> {
|
||||
//player.sendMessage("You have been paid " + Configuration.g_dPaymentAmount + " for being online.");
|
||||
|
|
|
@ -4,7 +4,8 @@ public class Configuration {
|
|||
public static double g_dPaymentAmount = 0.0;
|
||||
public static int g_iPaymentInterval = 0;
|
||||
public static String g_sBankAccount = "";
|
||||
|
||||
public static boolean g_bVerbose = false;
|
||||
|
||||
|
||||
public static boolean PaymentEnabled() {
|
||||
return g_iPaymentInterval > 0;
|
||||
|
|
|
@ -5,4 +5,7 @@ amountToGive: 0.25
|
|||
duration: 60
|
||||
|
||||
# Bank account if applicable. Leave blank if undesired.
|
||||
bank: ""
|
||||
bank: ""
|
||||
|
||||
# Whether to print a log message in console every payout
|
||||
verbose: false
|
Loading…
Add table
Add a link
Reference in a new issue