From 996acdc4fb71ed8c88ee276461b178e9a25db5fb Mon Sep 17 00:00:00 2001 From: Brettflan Date: Wed, 1 Jun 2011 06:54:00 -0500 Subject: [PATCH] Added powerRegenOffline option for those who for whatever reason want player power to regenerate even when they are offline; increased default power loss from death from 2 to 4 --- src/org/mcteam/factions/Conf.java | 3 ++- src/org/mcteam/factions/FPlayer.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/mcteam/factions/Conf.java b/src/org/mcteam/factions/Conf.java index 7f622121..353ae0d3 100644 --- a/src/org/mcteam/factions/Conf.java +++ b/src/org/mcteam/factions/Conf.java @@ -25,7 +25,8 @@ public class Conf { public static double powerPlayerMax = 10; public static double powerPlayerMin = -10; public static double powerPerMinute = 0.2; // Default health rate... it takes 5 min to heal one power - public static double powerPerDeath = 2; //A death makes you loose 2 power + public static double powerPerDeath = 4; // A death makes you lose 4 power + public static boolean powerRegenOffline = false; // does player power regenerate even while they're offline? public static String prefixAdmin = "**"; public static String prefixMod = "*"; diff --git a/src/org/mcteam/factions/FPlayer.java b/src/org/mcteam/factions/FPlayer.java index 342e0b94..ba1a4a54 100644 --- a/src/org/mcteam/factions/FPlayer.java +++ b/src/org/mcteam/factions/FPlayer.java @@ -326,7 +326,7 @@ public class FPlayer { } protected void updatePower() { - if (this.isOffline()) { + if (this.isOffline() && !Conf.powerRegenOffline) { return; } long now = System.currentTimeMillis();