package org.inventivetalent.npclib;

import org.bukkit.Bukkit;
import org.bukkit.event.Listener;
import org.bukkit.plugin.java.JavaPlugin;
import org.inventivetalent.apihelper.APIManager;
import org.inventivetalent.npclib.command.SpawnCommands;
import org.inventivetalent.npclib.registry.NPCRegistry;
import org.inventivetalent.pluginannotations.PluginAnnotations;

public class NPCLibPlugin extends JavaPlugin implements Listener {

	private NPCLib npcLibInstance = new NPCLib();
	private NPCRegistry pluginNpcRegistry;

	@Override
	public void onLoad() {
		APIManager.registerAPI(npcLibInstance, this);
	}

	@Override
	public void onEnable() {
		saveDefaultConfig();

		NPCLib.logger = getLogger();
		NPCLib.debug = getConfig().getBoolean("debug");

		APIManager.initAPI(NPCLib.class);
		pluginNpcRegistry = NPCLib.createRegistry(this);

		Bukkit.getPluginManager().registerEvents(this, this);
		PluginAnnotations.COMMAND.load(this, new SpawnCommands(this));
	}

	@Override
	public void onDisable() {
		APIManager.disableAPI(NPCLib.class);
	}

	public NPCRegistry getPluginNpcRegistry() {
		return pluginNpcRegistry;
	}

}
@@ -639,16 +639,446 @@
 ble() %7B%0A
+%09%09if (!Bukkit.getPluginManager().isPluginEnabled(%22PacketListenerAPI%22)) %7B%0A%09%09%09getLogger().severe(%22Please install PacketListenerAPI: http://www.spigotmc.org/resources/2930/%22);%0A%09%09%09throw new RuntimeException(%22PacketListenerAPI not installed%22);%0A%09%09%7D%0A%09%09if (!Bukkit.getPluginManager().isPluginEnabled(%22NickNamer%22)) %7B%0A%09%09%09getLogger().warning(%22Please install NickNamer for proper skin support: http://www.spigotmc.org/resources/5341/%22);%0A%09%09%7D%0A%0A
 %09%09saveDe

add dependency check