Land Reward Task up and running.

Conflicts:
	src/com/massivecraft/factions/Conf.java
	src/com/massivecraft/factions/listeners/FactionsPlayerListener.java
This commit is contained in:
ÆtherSurfer 2012-11-30 15:02:43 -05:00
parent ca219a1fb2
commit 2f883455ee
4 changed files with 8 additions and 3 deletions

View File

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

View File

@ -263,6 +263,7 @@ public class Factions extends EntityCollection<Faction>
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<Faction>
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)");
}
}
}

View File

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

View File

@ -10,7 +10,7 @@ public class EconLandRewardTask implements Runnable {
public EconLandRewardTask()
{
this.rate = Conf.autoLeaveRoutineRunsEveryXMinutes;
this.rate = Conf.econLandRewardTaskRunsEveryXMinutes;
}
@Override