public void onEnable(){

		plugin = this;
		
		//command registering
		CommandManager cmdman = new CommandManager();
		cmdman.registerNewCommand("help", new HelpCommand());
		cmdman.registerNewCommand("toggle", new ToggleHandler());
		getCommand("notch").setExecutor(new CommandManager());

		configfile = new File(getDataFolder(), "config.yml");

		try{
			firstRun();
		}catch(Exception e){
			e.printStackTrace();
		}

		config = new YamlConfiguration();
		loadYamls();

		torch = new ItemStack(Material.getMaterial(config.getInt("item")));

		PluginManager manager = Bukkit.getServer().getPluginManager();

		manager.registerEvents(new ToggleListener(), this);

		Player[] players = Bukkit.getOnlinePlayers();
		for(Player player : players){
			if(players.length > 0){
				if(player.hasPermission("torch.use")){
					mode.put(player.getName(), Mode.Lightning);
				}
			}
		}
		
		getLogger().info("Enabled!");
		
	}