Push pending stuff.
This commit is contained in:
parent
b50cebcdb6
commit
eb770edd7a
@ -103,7 +103,6 @@ public class Board {
|
|||||||
while (iter.hasNext()) {
|
while (iter.hasNext()) {
|
||||||
Entry<FLocation, String> entry = iter.next();
|
Entry<FLocation, String> entry = iter.next();
|
||||||
if (!Factions.i.exists(entry.getValue())) {
|
if (!Factions.i.exists(entry.getValue())) {
|
||||||
|
|
||||||
P.p.log("Board cleaner removed " + entry.getValue() + " from " + entry.getKey());
|
P.p.log("Board cleaner removed " + entry.getValue() + " from " + entry.getKey());
|
||||||
iter.remove();
|
iter.remove();
|
||||||
}
|
}
|
||||||
@ -234,7 +233,7 @@ public class Board {
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public static Map<String, Map<String, String>> dumpAsSaveFormat() {
|
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 worldName, coords;
|
||||||
String id;
|
String id;
|
||||||
|
@ -24,11 +24,11 @@ public class Faction extends Entity implements EconomyParticipator {
|
|||||||
private Map<String, Relation> relationWish;
|
private Map<String, Relation> relationWish;
|
||||||
|
|
||||||
// FIELD: claimOwnership
|
// FIELD: claimOwnership
|
||||||
private Map<FLocation, Set<String>> claimOwnership = new ConcurrentHashMap<FLocation, Set<String>>();
|
private Map<FLocation, Set<String>> claimOwnership = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
// FIELD: fplayers
|
// FIELD: fplayers
|
||||||
// speedy lookup of players in faction
|
// speedy lookup of players in faction
|
||||||
private transient Set<FPlayer> fplayers = new HashSet<FPlayer>();
|
private transient Set<FPlayer> fplayers = new HashSet<>();
|
||||||
|
|
||||||
// FIELD: invites
|
// FIELD: invites
|
||||||
// Where string is a lowercase player name
|
// Where string is a lowercase player name
|
||||||
@ -217,7 +217,7 @@ public class Faction extends Entity implements EconomyParticipator {
|
|||||||
// -------------------------------------------- //
|
// -------------------------------------------- //
|
||||||
|
|
||||||
public Faction() {
|
public Faction() {
|
||||||
this.relationWish = new HashMap<String, Relation>();
|
this.relationWish = new HashMap<>();
|
||||||
this.invites = new HashSet<String>();
|
this.invites = new HashSet<String>();
|
||||||
this.open = Conf.newFactionsDefaultOpen;
|
this.open = Conf.newFactionsDefaultOpen;
|
||||||
this.tag = "???";
|
this.tag = "???";
|
||||||
@ -395,12 +395,12 @@ public class Faction extends Entity implements EconomyParticipator {
|
|||||||
|
|
||||||
public Set<FPlayer> getFPlayers() {
|
public Set<FPlayer> getFPlayers() {
|
||||||
// return a shallow copy of the FPlayer list, to prevent tampering and concurrency issues
|
// 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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Set<FPlayer> getFPlayersWhereOnline(boolean online) {
|
public Set<FPlayer> getFPlayersWhereOnline(boolean online) {
|
||||||
Set<FPlayer> ret = new HashSet<FPlayer>();
|
Set<FPlayer> ret = new HashSet<>();
|
||||||
|
|
||||||
for (FPlayer fplayer : fplayers) {
|
for (FPlayer fplayer : fplayers) {
|
||||||
if (fplayer.isOnline() == online) {
|
if (fplayer.isOnline() == online) {
|
||||||
@ -423,7 +423,7 @@ public class Faction extends Entity implements EconomyParticipator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<FPlayer> getFPlayersWhereRole(Role role) {
|
public ArrayList<FPlayer> getFPlayersWhereRole(Role role) {
|
||||||
ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
|
ArrayList<FPlayer> ret = new ArrayList<>();
|
||||||
if (!this.isNormal()) return ret;
|
if (!this.isNormal()) return ret;
|
||||||
|
|
||||||
for (FPlayer fplayer : fplayers) {
|
for (FPlayer fplayer : fplayers) {
|
||||||
@ -436,7 +436,7 @@ public class Faction extends Entity implements EconomyParticipator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ArrayList<Player> getOnlinePlayers() {
|
public ArrayList<Player> getOnlinePlayers() {
|
||||||
ArrayList<Player> ret = new ArrayList<Player>();
|
ArrayList<Player> ret = new ArrayList<>();
|
||||||
if (this.isPlayerFreeType()) return ret;
|
if (this.isPlayerFreeType()) return ret;
|
||||||
|
|
||||||
for (Player player : P.p.getServer().getOnlinePlayers()) {
|
for (Player player : P.p.getServer().getOnlinePlayers()) {
|
||||||
|
@ -184,7 +184,7 @@ public abstract class EntityCollection<E extends Entity> {
|
|||||||
if (saveIsRunning) return true;
|
if (saveIsRunning) return true;
|
||||||
saveIsRunning = true;
|
saveIsRunning = true;
|
||||||
|
|
||||||
Map<String, E> entitiesThatShouldBeSaved = new HashMap<String, E>();
|
Map<String, E> entitiesThatShouldBeSaved = new HashMap<>();
|
||||||
for (E entity : this.entities) {
|
for (E entity : this.entities) {
|
||||||
if (entity.shouldBeSaved()) {
|
if (entity.shouldBeSaved()) {
|
||||||
entitiesThatShouldBeSaved.put(entity.getId(), entity);
|
entitiesThatShouldBeSaved.put(entity.getId(), entity);
|
||||||
@ -212,7 +212,7 @@ public abstract class EntityCollection<E extends Entity> {
|
|||||||
|
|
||||||
private Map<String, E> loadCore() {
|
private Map<String, E> loadCore() {
|
||||||
if (!this.file.exists()) {
|
if (!this.file.exists()) {
|
||||||
return new HashMap<String, E>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
String content = DiscUtil.readCatch(this.file);
|
String content = DiscUtil.readCatch(this.file);
|
||||||
|
Loading…
Reference in New Issue
Block a user