From 3e15189c11fad680f7d199d643271eb65812a59d Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Fri, 31 Oct 2014 10:47:59 -0400 Subject: [PATCH] Ensure that even if fields are missing from save file, that fields are instantiated. --- .../factions/zcore/persist/MemoryFaction.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java index 3be89f1b..69a9d020 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/MemoryFaction.java @@ -41,11 +41,11 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator { protected transient long lastPlayerLoggedOffTime; protected double money; protected double powerBoost; - protected Map relationWish; + protected Map relationWish = new HashMap(); protected Map> claimOwnership = new ConcurrentHashMap>(); protected transient Set fplayers = new HashSet(); - protected Set invites; - protected HashMap> announcements; + protected Set invites = new HashSet(); + protected HashMap> announcements = new HashMap>(); public HashMap> getAnnouncements() { return this.announcements; @@ -236,8 +236,6 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator { public MemoryFaction(String id) { this.id = id; - this.relationWish = new HashMap(); - this.invites = new HashSet(); this.open = Conf.newFactionsDefaultOpen; this.tag = "???"; this.description = "Default faction description :("; @@ -247,7 +245,6 @@ public abstract class MemoryFaction implements Faction, EconomyParticipator { this.permanent = false; this.money = 0.0; this.powerBoost = 0.0; - this.announcements = new HashMap>(); } public MemoryFaction(MemoryFaction old) {