Push pending stuff.

This commit is contained in:
drtshock 2014-04-13 16:31:10 -04:00
parent b50cebcdb6
commit eb770edd7a
3 changed files with 10 additions and 11 deletions

View File

@ -103,7 +103,6 @@ public class Board {
while (iter.hasNext()) {
Entry<FLocation, String> 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<String, Map<String, String>> dumpAsSaveFormat() {
Map<String, Map<String, String>> worldCoordIds = new HashMap<String, Map<String, String>>();
Map<String, Map<String, String>> worldCoordIds = new HashMap<>();
String worldName, coords;
String id;

View File

@ -24,11 +24,11 @@ public class Faction extends Entity implements EconomyParticipator {
private Map<String, Relation> relationWish;
// FIELD: claimOwnership
private Map<FLocation, Set<String>> claimOwnership = new ConcurrentHashMap<FLocation, Set<String>>();
private Map<FLocation, Set<String>> claimOwnership = new ConcurrentHashMap<>();
// FIELD: fplayers
// speedy lookup of players in faction
private transient Set<FPlayer> fplayers = new HashSet<FPlayer>();
private transient Set<FPlayer> 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<String, Relation>();
this.relationWish = new HashMap<>();
this.invites = new HashSet<String>();
this.open = Conf.newFactionsDefaultOpen;
this.tag = "???";
@ -395,12 +395,12 @@ public class Faction extends Entity implements EconomyParticipator {
public Set<FPlayer> getFPlayers() {
// return a shallow copy of the FPlayer list, to prevent tampering and concurrency issues
Set<FPlayer> ret = new HashSet<FPlayer>(fplayers);
Set<FPlayer> ret = new HashSet<>(fplayers);
return ret;
}
public Set<FPlayer> getFPlayersWhereOnline(boolean online) {
Set<FPlayer> ret = new HashSet<FPlayer>();
Set<FPlayer> ret = new HashSet<>();
for (FPlayer fplayer : fplayers) {
if (fplayer.isOnline() == online) {
@ -423,7 +423,7 @@ public class Faction extends Entity implements EconomyParticipator {
}
public ArrayList<FPlayer> getFPlayersWhereRole(Role role) {
ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
ArrayList<FPlayer> 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<Player> getOnlinePlayers() {
ArrayList<Player> ret = new ArrayList<Player>();
ArrayList<Player> ret = new ArrayList<>();
if (this.isPlayerFreeType()) return ret;
for (Player player : P.p.getServer().getOnlinePlayers()) {

View File

@ -184,7 +184,7 @@ public abstract class EntityCollection<E extends Entity> {
if (saveIsRunning) return true;
saveIsRunning = true;
Map<String, E> entitiesThatShouldBeSaved = new HashMap<String, E>();
Map<String, E> entitiesThatShouldBeSaved = new HashMap<>();
for (E entity : this.entities) {
if (entity.shouldBeSaved()) {
entitiesThatShouldBeSaved.put(entity.getId(), entity);
@ -212,7 +212,7 @@ public abstract class EntityCollection<E extends Entity> {
private Map<String, E> loadCore() {
if (!this.file.exists()) {
return new HashMap<String, E>();
return new HashMap<>();
}
String content = DiscUtil.readCatch(this.file);