Registered chunk loader into bukkit event listener.

This commit is contained in:
Harrison Deng 2020-05-02 19:21:32 -05:00
parent 486a0f837f
commit d8d0744350

View File

@ -1,17 +1,20 @@
package ca.recrown.islandsurvivalcraft; package ca.recrown.islandsurvivalcraft;
import org.bukkit.generator.ChunkGenerator; import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import ca.recrown.islandsurvivalcraft.world.generation.IslandWorldChunkGenerator; import ca.recrown.islandsurvivalcraft.world.generation.IslandWorldChunkGenerator;
public class IslandSurvivalCraft extends JavaPlugin { public class IslandSurvivalCraft extends JavaPlugin {
private PluginManager pluginManager;
private IslandWorldChunkGenerator chunkGenerator = new IslandWorldChunkGenerator(); private IslandWorldChunkGenerator chunkGenerator = new IslandWorldChunkGenerator();
@Override @Override
public void onEnable() { public void onEnable() {
pluginManager = getServer().getPluginManager();
pluginManager.registerEvents(chunkGenerator, this);
super.onEnable(); super.onEnable();
} }