mirror of
https://github.com/MassiveCraft/Factions.git
synced 2024-11-23 18:55:25 +01:00
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:
parent
ca219a1fb2
commit
2f883455ee
@ -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;
|
||||
|
@ -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)");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -10,7 +10,7 @@ public class EconLandRewardTask implements Runnable {
|
||||
|
||||
public EconLandRewardTask()
|
||||
{
|
||||
this.rate = Conf.autoLeaveRoutineRunsEveryXMinutes;
|
||||
this.rate = Conf.econLandRewardTaskRunsEveryXMinutes;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user