<commit_before>package com.runetooncraft.plugins.CostDistanceTeleporter;

import java.io.File;

import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.permission.Permission;

import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

import com.earth2me.essentials.IEssentials;

public class CDT extends JavaPlugin {
	Config config = null;
	public static IEssentials ess;
	public static Economy econ;
	public static Permission perms;
	public void onEnable() {
		loadconfig();
		checkessentials();
		checkvault();
		getServer().getPluginManager().registerEvents(new Teleportlistener(config), this);
		getCommand("cdt").setExecutor(new Commandlistener(config));
	}

	private void checkvault() {
		if(getServer().getPluginManager().getPlugin("Vault") == null) {
			Messenger.severe("Vault not found, CDT disabling");
			this.getServer().getPluginManager().disablePlugin(this);
		}else{
			Messenger.info("Found Vault");
			RegisteredServiceProvider<Economy> eco = getServer().getServicesManager().getRegistration(Economy.class);
			econ = eco.getProvider();
			 RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
		    perms = rsp.getProvider();
		}
		
	}

	private void loadconfig() {
		File dir = this.getDataFolder();
		if (!dir.exists()) dir.mkdir();
		File file = new File(this.getDataFolder(), "config.yml");
		config = new Config(file);
		if (!config.load()) {
			this.getServer().getPluginManager().disablePlugin(this);
			throw new IllegalStateException("The config-file was not loaded correctly!");
		}
		passconfig();
//		config.save();	
	}

	private void passconfig() {
		Messenger m = new Messenger(config);
		parseLocation pl = new parseLocation(config);
	}

	private void checkessentials() {
		Plugin essPlugin;
		if(getServer().getPluginManager().isPluginEnabled("Essentials")) {
			Messenger.info("Found Essentials");
			essPlugin = Bukkit.getPluginManager().getPlugin("Essentials");
			ess = (IEssentials)essPlugin;
		}else{
			Messenger.severe("Essentials not found, CDT disabling");
			this.getServer().getPluginManager().disablePlugin(this);
		}
		
	}
}<commit_msg>Added some extra commenting to explain a few things<commit_after>package com.runetooncraft.plugins.CostDistanceTeleporter;

import java.io.File;

import net.milkbowl.vault.economy.Economy;
import net.milkbowl.vault.permission.Permission;

import org.bukkit.Bukkit;
import org.bukkit.plugin.Plugin;
import org.bukkit.plugin.RegisteredServiceProvider;
import org.bukkit.plugin.java.JavaPlugin;

import com.earth2me.essentials.IEssentials;

public class CDT extends JavaPlugin {
	Config config = null;
	public static IEssentials ess;
	public static Economy econ;
	public static Permission perms;
	public void onEnable() {
		loadconfig();
		checkessentials();
		checkvault();
		getServer().getPluginManager().registerEvents(new Teleportlistener(config), this);
		getCommand("cdt").setExecutor(new Commandlistener(config));
	}

	private void checkvault() {
		if(getServer().getPluginManager().getPlugin("Vault") == null) {
			Messenger.severe("Vault not found, CDT disabling");
			this.getServer().getPluginManager().disablePlugin(this);
		}else{
			Messenger.info("Found Vault");
			RegisteredServiceProvider<Economy> eco = getServer().getServicesManager().getRegistration(Economy.class);
			econ = eco.getProvider();
			 RegisteredServiceProvider<Permission> rsp = getServer().getServicesManager().getRegistration(Permission.class);
		    perms = rsp.getProvider();
		}
		
	}

	private void loadconfig() {
		File dir = this.getDataFolder();
		if (!dir.exists()) dir.mkdir();
		File file = new File(this.getDataFolder(), "config.yml");
		config = new Config(file);
		if (!config.load()) {
			this.getServer().getPluginManager().disablePlugin(this);
			throw new IllegalStateException("The config-file was not loaded correctly!");
		}
		passconfig();
//		config.save(); This was just for debugging purposes
	}

	private void passconfig() {
		Messenger m = new Messenger(config);
		parseLocation pl = new parseLocation(config);
	}

	private void checkessentials() {
		Plugin essPlugin;
		if(getServer().getPluginManager().isPluginEnabled("Essentials")) {
			Messenger.info("Found Essentials");
			essPlugin = Bukkit.getPluginManager().getPlugin("Essentials");
			ess = (IEssentials)essPlugin;
		}else{
			Messenger.severe("Essentials not found, CDT disabling");
			this.getServer().getPluginManager().disablePlugin(this);
		}
		
	}
}
{'fraction_non_alphanumeric': 0.1314410480349345, 'fraction_numerical': 0.0004366812227074236, 'mean_word_length': 5.398044692737431, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3314086', 'n_tokens_mistral': 1536, 'n_tokens_neox': 1370, 'n_words': 280}