38 lines
963 B
Java
38 lines
963 B
Java
package com.alttd.cometskyblock;
|
|
|
|
import com.alttd.cometskyblock.listeners.PlayerJoinListener;
|
|
import com.alttd.cometskyblock.worldgenerator.IslandGenerator;
|
|
import org.bukkit.Bukkit;
|
|
import org.bukkit.World;
|
|
import org.bukkit.plugin.PluginManager;
|
|
import org.bukkit.plugin.java.JavaPlugin;
|
|
|
|
public class CometSkyBlockPlugin extends JavaPlugin implements CometSkyBlockAPI {
|
|
|
|
private static CometSkyBlockPlugin instance;
|
|
|
|
@Override
|
|
public void onLoad() {
|
|
instance = this;
|
|
CometSkyBlockAPI.Provider.register(instance);
|
|
}
|
|
|
|
@Override
|
|
public void onEnable() {
|
|
String island = "Island";
|
|
World world = Bukkit.getWorld(island);
|
|
if (world == null) {
|
|
new IslandGenerator(instance).create(island);
|
|
}
|
|
|
|
final PluginManager pm = getServer().getPluginManager();
|
|
pm.registerEvents(new PlayerJoinListener(this), this);
|
|
}
|
|
|
|
@Override
|
|
public void onDisable() {
|
|
|
|
}
|
|
|
|
}
|