Skip to content

Commit

Permalink
Some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Fedin committed Dec 4, 2016
1 parent c79994f commit 295f529
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/main/java/mregioneer/mcaliases/World.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public class World {

private Map<Point2d, RegionFile> region_files = new HashMap<Point2d, RegionFile>();

//listener to save regions if they are removed from cache
EvictionListener<Point2d, Region> listener;
{
listener = new EvictionListener<Point2d, Region>() {
Expand All @@ -45,6 +46,11 @@ public Void call() throws IOException {
.listener(listener)
.build();

/**
* World constructor. Default region quantity is set to 10
* @param world_dir mca files directory
* @throws IOException
*/
public World(File world_dir) throws IOException {

this.world_dir = world_dir;
Expand Down Expand Up @@ -74,7 +80,13 @@ public World(File world_dir) throws IOException {
}
}
}


/**
* World constructor
* @param world_dir mca files directory
* @param region_limit sets how many regions will be cached
* @throws IOException
*/
public World(File world_dir, int region_limit) throws IOException {
this(world_dir);

Expand Down

0 comments on commit 295f529

Please sign in to comment.