Permission for not losing power while offline.
This commit is contained in:
parent
8354c95a14
commit
c3ac0cf1ea
@ -514,6 +514,9 @@ public abstract class MemoryFPlayer implements FPlayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void losePowerFromBeingOffline() {
|
public void losePowerFromBeingOffline() {
|
||||||
|
if(P.perms != null && P.perms.playerHas((String) null, getName(), "factions.dontlosepoweroffline")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Conf.powerOfflineLossPerDay > 0.0 && this.power > Conf.powerOfflineLossLimit) {
|
if (Conf.powerOfflineLossPerDay > 0.0 && this.power > Conf.powerOfflineLossLimit) {
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
long millisPassed = now - this.lastPowerUpdateTime;
|
long millisPassed = now - this.lastPowerUpdateTime;
|
||||||
|
@ -253,3 +253,5 @@ permissions:
|
|||||||
description: sort factions
|
description: sort factions
|
||||||
factions.togglealliancechat:
|
factions.togglealliancechat:
|
||||||
description: toggle alliance chat on and off
|
description: toggle alliance chat on and off
|
||||||
|
factions.dontlosepoweroffline:
|
||||||
|
description: Don't lose power for being offline.
|
Loading…
Reference in New Issue
Block a user