public void loadPlugins(){
		String runPath = getClass().getProtectionDomain().getCodeSource().getLocation().getPath();
		
		try {
			List<File> files = Util.getFileList(Folders.PLUGIN.getAbsolutePath());
			for(File f: files){
				if(!f.getName().endsWith(".jar"))
					return;
				URL path = new URL("jar:" + f.toURI().toURL() + "!/plugin.yml");
				
				YAMLFile pluginFile = new YAMLFile(true);
				pluginFile.Load(path);
				
				if(pluginFile.getString("name") == null || pluginFile.getString("main") == null){
					continue;
				}
				Plugin p = (Plugin)Class.forName(pluginFile.getString("main")).newInstance();
				plugins.add(p);
				pluginNames.put(p, pluginFile.getString("name"));
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		
		if(!runPath.endsWith(".jar")){
			try{
				File pluginYML = new File(runPath + "/plugin.yml");
				YAMLFile pluginFile = new YAMLFile(false);
				pluginFile.Load(pluginYML);
				if(pluginFile.getString("name") == null || pluginFile.getString("main") == null){
					return;
				}
				Plugin p = (Plugin)Class.forName(pluginFile.getString("main")).newInstance();
				plugins.add(p);
				pluginNames.put(p, pluginFile.getString("name"));
			}catch(Exception e){
				e.printStackTrace();
			}
		}
	}