From 2f883455ee02a24b4c516f62f5b391f97b5f770d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86therSurfer?= Date: Fri, 30 Nov 2012 15:02:43 -0500 Subject: [PATCH] Land Reward Task up and running. Conflicts: src/com/massivecraft/factions/Conf.java src/com/massivecraft/factions/listeners/FactionsPlayerListener.java --- src/com/massivecraft/factions/Conf.java | 3 ++- src/com/massivecraft/factions/Factions.java | 3 ++- src/com/massivecraft/factions/P.java | 3 +++ src/com/massivecraft/factions/util/EconLandRewardTask.java | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/com/massivecraft/factions/Conf.java b/src/com/massivecraft/factions/Conf.java index b1c8e323..e0f2b25e 100644 --- a/src/com/massivecraft/factions/Conf.java +++ b/src/com/massivecraft/factions/Conf.java @@ -239,7 +239,8 @@ public class Conf public static double econCostEnemy = 0.0; public static int econLandRewardTaskRunsEveryXMinutes = 20; - public static double econLandReward = 0.01; + public static double econLandReward = 0.03; + public static double econLandRevertEnemyReward = 25.0; //Faction banks, to pay for land claiming and other costs instead of individuals paying for them public static boolean bankEnabled = true; diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index 84284faa..736ed66c 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -263,6 +263,7 @@ public class Factions extends EntityCollection public void econLandRewardRoutine() { + P.p.log("Running econLandRewardRoutine..."); for (Faction faction : this.get()) { int landCount = faction.getLandRounded(); @@ -273,7 +274,7 @@ public class Factions extends EntityCollection double reward = Conf.econLandReward * landCount / playerCount; for (FPlayer player : players) { - Econ.modifyMoney(player, reward, "to own faction land plots", "for faction owning " + landCount + " plots divided among " + playerCount + " members"); + Econ.modifyMoney(player, reward, "to own faction land", "for faction owning " + landCount + " land divided among " + playerCount + " member(s)"); } } } diff --git a/src/com/massivecraft/factions/P.java b/src/com/massivecraft/factions/P.java index 87ce2d97..29539959 100644 --- a/src/com/massivecraft/factions/P.java +++ b/src/com/massivecraft/factions/P.java @@ -128,6 +128,9 @@ public class P extends MPlugin // start up task which runs the autoLeaveAfterDaysOfInactivity routine startAutoLeaveTask(false); + // start up task which runs the econLandRewardRoutine + startEconLandRewardTask(false); + // Register Event Handlers getServer().getPluginManager().registerEvents(this.playerListener, this); getServer().getPluginManager().registerEvents(this.chatListener, this); diff --git a/src/com/massivecraft/factions/util/EconLandRewardTask.java b/src/com/massivecraft/factions/util/EconLandRewardTask.java index 1f8f449e..98f150b7 100644 --- a/src/com/massivecraft/factions/util/EconLandRewardTask.java +++ b/src/com/massivecraft/factions/util/EconLandRewardTask.java @@ -10,7 +10,7 @@ public class EconLandRewardTask implements Runnable { public EconLandRewardTask() { - this.rate = Conf.autoLeaveRoutineRunsEveryXMinutes; + this.rate = Conf.econLandRewardTaskRunsEveryXMinutes; } @Override