public void onEnable() {
		getServer().getPluginManager().registerEvents(this, this);
		getServer().getPluginManager().registerEvents(new RedstoneUpdateListener(), this);
		
		CONFIG = getConfig();

		if (CONFIG.get("threshold") != null) {
			THRESHOLD = CONFIG.getInt("threshold");
		}
		if (CONFIG.get("refreshTime") != null) {
			REFRESH_TIME = CONFIG.getInt("refreshTime");
		}
		
		// Handle commands in another class
		this.getCommand("cd").setExecutor(new CommandManager(this));

		// Set timers
		BukkitScheduler scheduler = Bukkit.getServer().getScheduler();
		scheduler.scheduleSyncRepeatingTask(this, new RefreshTask(), 0L, REFRESH_TIME * 20L);
		scheduler.scheduleSyncRepeatingTask(this, new ExistenceTask(this), 0L, 5L);
		
		// Check for updates
		Updater updater = new Updater(this, 84429, this.getFile(), Updater.UpdateType.DEFAULT, true);
		if(updater.getResult() == UpdateResult.SUCCESS){
			for(Player p : getServer().getOnlinePlayers()){
				if(p.hasPermission("CircuitDetector.cd")){
					Util.sendMessage(p, "Circuit Detector has updated to version \"" + updater.getLatestName() + "\"! Reload the server to load the new update.");
				}
			}
		}
	}