Group up the transient FPlayer fields.

This commit is contained in:
Olof Larsson 2013-04-12 08:11:11 +02:00
parent 7693ac2010
commit 3e68c38861
2 changed files with 16 additions and 9 deletions

View File

@ -61,14 +61,9 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
}*/
// -------------------------------------------- //
// FIELDS
// FIELDS: RAW PERMANENT
// -------------------------------------------- //
// Where did this player stand the last time we checked?
private transient PS currentChunk = null;
public PS getCurrentChunk() { return this.currentChunk; }
public void setCurrentChunk(PS currentChunk) { this.currentChunk = currentChunk.getChunk(true); }
// FIELD: factionId
private String factionId;
public Faction getFaction() { if(this.factionId == null) {return null;} return FactionColl.i.get(this.factionId); }
@ -109,6 +104,15 @@ public class FPlayer extends PlayerEntity implements EconomyParticipator
// FIELD: lastLoginTime
private long lastLoginTime;
// -------------------------------------------- //
// FIELDS: RAW TRANSIENT
// -------------------------------------------- //
// Where did this player stand the last time we checked?
private transient PS currentChunk = null;
public PS getCurrentChunk() { return this.currentChunk; }
public void setCurrentChunk(PS currentChunk) { this.currentChunk = currentChunk.getChunk(true); }
// FIELD: mapAutoUpdating
private transient boolean mapAutoUpdating;
public void setMapAutoUpdating(boolean mapAutoUpdating) { this.mapAutoUpdating = mapAutoUpdating; }

View File

@ -178,9 +178,12 @@ public class Factions extends MPlugin
this.getServer().getScheduler().cancelTask(econLandRewardTaskID);
}
if (ConfServer.econEnabled &&
if
(
ConfServer.econEnabled &&
ConfServer.econLandRewardTaskRunsEveryXMinutes > 0.0 &&
ConfServer.econLandReward > 0.0)
ConfServer.econLandReward > 0.0
)
{
long ticks = (long)(20 * 60 * ConfServer.econLandRewardTaskRunsEveryXMinutes);
econLandRewardTaskID = getServer().getScheduler().scheduleSyncRepeatingTask(this, new EconLandRewardTask(), ticks, ticks);