@Override
	public void onEnable() {
		plugin = this;
		
		//Creating the folders
		if (!subdir.exists()) {
			subdir.mkdir();
		}
		if (plugin.getConfig().getBoolean("Log.SeparateFolderforStaff")) {
			if (!subdir2.exists()) {
				subdir2.mkdir();
			}
		}
		
		config.LoadConfiguration();
		getConfig.getValues();
		mysql.createDatabase();
		
		//Registering Listeners
		Bukkit.getServer().getPluginManager().registerEvents(new PListener(this), this);
		
		//Commands
		executor = new playerloggerCommand(this);
		getCommand("playerlogger").setExecutor(executor);
		
		//Metrics
		try {
			MetricsLite metrics = new MetricsLite(this);
			metrics.start();
		} catch (IOException e) {
			// Failed to submit the stats :-(
		}
		
}