From 3e68c38861416b6c16c0b878eb7764109e731db6 Mon Sep 17 00:00:00 2001 From: Olof Larsson Date: Fri, 12 Apr 2013 08:11:11 +0200 Subject: [PATCH] Group up the transient FPlayer fields. --- src/com/massivecraft/factions/FPlayer.java | 16 ++++++++++------ src/com/massivecraft/factions/Factions.java | 9 ++++++--- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/com/massivecraft/factions/FPlayer.java b/src/com/massivecraft/factions/FPlayer.java index 256281cb..2c17bef6 100644 --- a/src/com/massivecraft/factions/FPlayer.java +++ b/src/com/massivecraft/factions/FPlayer.java @@ -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; } diff --git a/src/com/massivecraft/factions/Factions.java b/src/com/massivecraft/factions/Factions.java index 432aefc7..82ec7796 100644 --- a/src/com/massivecraft/factions/Factions.java +++ b/src/com/massivecraft/factions/Factions.java @@ -93,7 +93,7 @@ public class Factions extends MPlugin HerochatFeatures.setup(); LWCFeatures.setup(); - if(ConfServer.worldGuardChecking) + if (ConfServer.worldGuardChecking) { Worldguard.init(this); } @@ -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);