mirror of
https://github.com/zontreck/AutoMoneyPlugin
synced 2025-06-19 10:23: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_dPaymentAmount = getConfig().getDouble("amountToGive", 0.25);
|
||||||
Configuration.g_iPaymentInterval = getConfig().getInt("duration", 60);
|
Configuration.g_iPaymentInterval = getConfig().getInt("duration", 60);
|
||||||
Configuration.g_sBankAccount = getConfig().getString("bank", "");
|
Configuration.g_sBankAccount = getConfig().getString("bank", "");
|
||||||
|
Configuration.g_bVerbose = getConfig().getBoolean("verbose", false);
|
||||||
|
|
||||||
// Setup the economy
|
// Setup the economy
|
||||||
if (!setupEconomy()) {
|
if (!setupEconomy()) {
|
||||||
|
@ -62,6 +63,9 @@ public class AutoMoneyPlugin extends JavaPlugin {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
if(Configuration.PaymentEnabled()) {
|
if(Configuration.PaymentEnabled()) {
|
||||||
|
if(Configuration.g_bVerbose) {
|
||||||
|
getLogger().info("Paying all online players " + Configuration.g_dPaymentAmount);
|
||||||
|
}
|
||||||
// Pay all online players
|
// Pay all online players
|
||||||
getServer().getOnlinePlayers().forEach(player -> {
|
getServer().getOnlinePlayers().forEach(player -> {
|
||||||
//player.sendMessage("You have been paid " + Configuration.g_dPaymentAmount + " for being online.");
|
//player.sendMessage("You have been paid " + Configuration.g_dPaymentAmount + " for being online.");
|
||||||
|
|
|
@ -4,6 +4,7 @@ public class Configuration {
|
||||||
public static double g_dPaymentAmount = 0.0;
|
public static double g_dPaymentAmount = 0.0;
|
||||||
public static int g_iPaymentInterval = 0;
|
public static int g_iPaymentInterval = 0;
|
||||||
public static String g_sBankAccount = "";
|
public static String g_sBankAccount = "";
|
||||||
|
public static boolean g_bVerbose = false;
|
||||||
|
|
||||||
|
|
||||||
public static boolean PaymentEnabled() {
|
public static boolean PaymentEnabled() {
|
||||||
|
|
|
@ -6,3 +6,6 @@ duration: 60
|
||||||
|
|
||||||
# Bank account if applicable. Leave blank if undesired.
|
# 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