Skip to content

Commit

Permalink
Final commit for first beta version! :)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoqhuuep committed Aug 2, 2014
1 parent d945622 commit 6f6d365
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
*/
public interface ICIsland {
/**
* @return The seed used to randomly generate this island.
* @return The random seed used to generate this island.
*/
long getSeed();

/**
* @return The name of the Class used to generate this island.
* @return The IslandGenerator used to generate this island.
*/
IslandGenerator getGenerator();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,17 @@ public void onEnable() {
}

saveDefaultConfig();

islandCraft = new DefaultIslandCraft();
if (!getConfig().getString("config-version").equals("1.0.0")) {
getLogger().severe("Incompatible config-version found in config.yml");
getLogger().info("Check for updates at http://dev.bukkit.org/bukkit-plugins/islandcraft/");
setEnabled(false);
return;
}

final IslandDatabase database = new EbeanServerIslandDatabase(EbeanServerUtil.build(this));

islandCraft = new DefaultIslandCraft();

final Listener listener = new BiomeGeneratorListener(islandCraft, database, getConfig(), nms);

getServer().getPluginManager().registerEvents(listener, this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ public DefaultWorld(final String name, final long seed, final IslandDatabase dat
ocean = classLoader.getBiomeDistribution(config.getString("ocean"));
islandDistribution = classLoader.getIslandDistribution(config.getString("island-distribution"));
islandGenerators = config.getStringList("island-generators");
// Load islandGenerators just to make sure there are no errors
for (final String islandGenerator : islandGenerators) {
classLoader.getIslandGenerator(islandGenerator);
}
databaseCache = CacheBuilder.newBuilder().expireAfterAccess(30, TimeUnit.SECONDS).build(new DatabaseCacheLoader());
}

Expand Down

0 comments on commit 6f6d365

Please sign in to comment.