public void loadPluginFromDirectory(File dir){
		List<File> files = Helper.getAllFilesInFolder(dir, new FilenameFilter() {
			@Override
			public boolean accept(File dir, String name) {
				return (name.toString().endsWith(".java"));// || name.toString().endsWith(".class"));
			}
		});
		
		//Loop trough all files and load the classes.
		//Only add classes the the loadedClasses list if they were loaded (!=null)
		for(File file : files) {
			String className = Helper.stripDotAndSlashFromString(file.toString());
			Log.getLogger().log(Level.INFO, "Loading class " + className + "...");
			Class<?> c = this.classLoader.loadClass(className);
			
			if(c != null){
				this.loadedClasses.add(c);
			}	
		}
		Log.getLogger().log(Level.INFO, "Loaded classes: " + this.loadedClasses.toString());
		
		/*Only parse classes right away if we do not thread the pluginLoader.
		 *The run method will call parseClassed if we thread.*/
		if(this.threaded == false){
			parseClasses(this.loadedClasses, Helper.getDefaultPluginParsers());
		} else {
			this.threaded = false;
		}
	}