Players no longer regain power while dead; no more waiting to respawn in order to regain power

Also added AuthDB to softdepend list, so it has first shot at Factions commands in case it needs to cancel one
This commit is contained in:
Brettflan committed 2012-01-28 05:59:07 -06:00
1 parent 5ac0baf84a
commit 30b3facc19
3 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@ name: Factions
version: 1.7_dev
main: com.massivecraft.factions.P
authors: [Olof Larsson, Brett Flannigan]
softdepend: [PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, CaptureThePoints, CombatTag]
softdepend: [PermissionsEx, Permissions, Essentials, EssentialsChat, HeroChat, iChat, LocalAreaChat, LWC, nChat, ChatManager, CAPI, AuthMe, Vault, Spout, WorldEdit, WorldGuard, AuthDB, CaptureThePoints, CombatTag]
commands:
factions:
description: Reference command for Factions.
@@ -385,6 +385,9 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
long millisPassed = now - this.lastPowerUpdateTime;
this.lastPowerUpdateTime = now;
Player thisPlayer = this.getPlayer();
if (thisPlayer != null && thisPlayer.isDead()) return; // don't let dead players regain power until they respawn
int millisPerMinute = 60*1000;
double powerPerMinute = Conf.powerPerMinute;
if(Conf.scaleNegativePower && this.power < 0)
@@ -285,6 +285,9 @@ public class FactionsPlayerListener implements Listener
public void onPlayerRespawn(PlayerRespawnEvent event)
{
FPlayer me = FPlayers.i.get(event.getPlayer());
me.getPower(); // update power, so they won't have gained any while dead
Location home = me.getFaction().getHome();
if
(