Added IslandsManager#getIslands()

#392
This commit is contained in:
Florian CUNY 2019-01-20 08:57:19 +01:00
parent 3f5736f555
commit aad36c100f

View File

@ -321,6 +321,16 @@ public class IslandsManager {
return Optional.ofNullable(islandCache.getIslandAt(location));
}
/**
* Returns an <strong>unmodifiable collection</strong> of all the islands (even those who may be unowned).
* @return unmodifiable collection containing every island.
* @since 1.1
*/
@NonNull
public Collection<Island> getIslands() {
return islandCache.getIslands();
}
/**
* Used for testing only to inject the islandCache mock object
* @param islandCache - island cache
@ -864,7 +874,6 @@ public class IslandsManager {
*/
public void save(Island island) {
handler.saveObject(island);
}
}