Java 6 compatible

This commit is contained in:
gravitylow 2014-04-15 15:19:00 -04:00
parent 8453ab3e76
commit 6c4cfd337e
5 changed files with 13 additions and 13 deletions

View File

@ -32,8 +32,8 @@
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>

View File

@ -233,7 +233,7 @@ public class Board {
// -------------------------------------------- //
public static Map<String, Map<String, String>> dumpAsSaveFormat() {
Map<String, Map<String, String>> worldCoordIds = new HashMap<>();
Map<String, Map<String, String>> worldCoordIds = new HashMap<String, Map<String, String>>();
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<>();
private Map<FLocation, Set<String>> claimOwnership = new ConcurrentHashMap<FLocation, Set<String>>();
// FIELD: fplayers
// speedy lookup of players in faction
private transient Set<FPlayer> fplayers = new HashSet<>();
private transient Set<FPlayer> fplayers = new HashSet<FPlayer>();
// 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<String, Relation>();
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<>(fplayers);
Set<FPlayer> ret = new HashSet<FPlayer>(fplayers);
return ret;
}
public Set<FPlayer> getFPlayersWhereOnline(boolean online) {
Set<FPlayer> ret = new HashSet<>();
Set<FPlayer> ret = new HashSet<FPlayer>();
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<>();
ArrayList<FPlayer> ret = new ArrayList<FPlayer>();
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<>();
ArrayList<Player> ret = new ArrayList<Player>();
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<>();
Map<String, E> entitiesThatShouldBeSaved = new HashMap<String, E>();
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<>();
return new HashMap<String, E>();
}
String content = DiscUtil.readCatch(this.file);

View File

@ -82,4 +82,4 @@ public class UUIDFetcher implements Callable<Map<String, UUID>> {
}
return JSONValue.toJSONString(lookups);
}
}
}