From eb770edd7a1894d15954924f8ae64ad9d843c8a1 Mon Sep 17 00:00:00 2001 From: drtshock Date: Sun, 13 Apr 2014 16:31:10 -0400 Subject: [PATCH] Push pending stuff. --- src/main/java/com/massivecraft/factions/Board.java | 3 +-- .../java/com/massivecraft/factions/Faction.java | 14 +++++++------- .../factions/zcore/persist/EntityCollection.java | 4 ++-- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/massivecraft/factions/Board.java b/src/main/java/com/massivecraft/factions/Board.java index 8c9e4ba7..0797e979 100644 --- a/src/main/java/com/massivecraft/factions/Board.java +++ b/src/main/java/com/massivecraft/factions/Board.java @@ -103,7 +103,6 @@ public class Board { while (iter.hasNext()) { Entry entry = iter.next(); if (!Factions.i.exists(entry.getValue())) { - P.p.log("Board cleaner removed " + entry.getValue() + " from " + entry.getKey()); iter.remove(); } @@ -234,7 +233,7 @@ public class Board { // -------------------------------------------- // public static Map> dumpAsSaveFormat() { - Map> worldCoordIds = new HashMap>(); + Map> worldCoordIds = new HashMap<>(); String worldName, coords; String id; diff --git a/src/main/java/com/massivecraft/factions/Faction.java b/src/main/java/com/massivecraft/factions/Faction.java index a3c681c1..4d4a97ff 100644 --- a/src/main/java/com/massivecraft/factions/Faction.java +++ b/src/main/java/com/massivecraft/factions/Faction.java @@ -24,11 +24,11 @@ public class Faction extends Entity implements EconomyParticipator { private Map relationWish; // FIELD: claimOwnership - private Map> claimOwnership = new ConcurrentHashMap>(); + private Map> claimOwnership = new ConcurrentHashMap<>(); // FIELD: fplayers // speedy lookup of players in faction - private transient Set fplayers = new HashSet(); + private transient Set fplayers = new HashSet<>(); // FIELD: invites // Where string is a lowercase player name @@ -217,7 +217,7 @@ public class Faction extends Entity implements EconomyParticipator { // -------------------------------------------- // public Faction() { - this.relationWish = new HashMap(); + this.relationWish = new HashMap<>(); this.invites = new HashSet(); this.open = Conf.newFactionsDefaultOpen; this.tag = "???"; @@ -395,12 +395,12 @@ public class Faction extends Entity implements EconomyParticipator { public Set getFPlayers() { // return a shallow copy of the FPlayer list, to prevent tampering and concurrency issues - Set ret = new HashSet(fplayers); + Set ret = new HashSet<>(fplayers); return ret; } public Set getFPlayersWhereOnline(boolean online) { - Set ret = new HashSet(); + Set ret = new HashSet<>(); for (FPlayer fplayer : fplayers) { if (fplayer.isOnline() == online) { @@ -423,7 +423,7 @@ public class Faction extends Entity implements EconomyParticipator { } public ArrayList getFPlayersWhereRole(Role role) { - ArrayList ret = new ArrayList(); + ArrayList ret = new ArrayList<>(); if (!this.isNormal()) return ret; for (FPlayer fplayer : fplayers) { @@ -436,7 +436,7 @@ public class Faction extends Entity implements EconomyParticipator { } public ArrayList getOnlinePlayers() { - ArrayList ret = new ArrayList(); + ArrayList ret = new ArrayList<>(); if (this.isPlayerFreeType()) return ret; for (Player player : P.p.getServer().getOnlinePlayers()) { diff --git a/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java b/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java index 46026b60..6c19bcad 100644 --- a/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java +++ b/src/main/java/com/massivecraft/factions/zcore/persist/EntityCollection.java @@ -184,7 +184,7 @@ public abstract class EntityCollection { if (saveIsRunning) return true; saveIsRunning = true; - Map entitiesThatShouldBeSaved = new HashMap(); + Map entitiesThatShouldBeSaved = new HashMap<>(); for (E entity : this.entities) { if (entity.shouldBeSaved()) { entitiesThatShouldBeSaved.put(entity.getId(), entity); @@ -212,7 +212,7 @@ public abstract class EntityCollection { private Map loadCore() { if (!this.file.exists()) { - return new HashMap(); + return new HashMap<>(); } String content = DiscUtil.readCatch(this.file);