// Path: NmsReference/src/main/java/me/treyruffy/treysdoublejump/nmsreference/ParticlesMain.java
// public interface ParticlesMain {
// 
// 	// Interface for all versions 1.8 - 1.16.4+
// 	void sendParticle(Player p, String particle, Location loc, int amount, float r, float g, float b);
// 	
// }
// 
// Path: TreysDoubleJump/src/main/java/me/treyruffy/treysdoublejump/util/ConfigManager.java
// public class ConfigManager {
// 
// 	// Accesses the main class
// 	private static final TreysDoubleJump plugin = TreysDoubleJump.getInstance();
// 	
// 	// Accesses the configuration
// 	public static FileConfiguration MainConfig;
// 
// 	// Accesses the configuration file
// 	public static File MainConfigFile;
// 
// 	// Gets the config
// 	public static FileConfiguration getConfig() {
// 		if (MainConfig == null) {
// 			reloadConfig();
// 		}
// 		return MainConfig; 
// 	}
// 
// 	// Saves the config
// 	public static void saveConfig() {
// 		if (MainConfig == null) {
// 			throw new NullArgumentException("Cannot save a non-existent file!");
// 		}
// 		try {
// 			MainConfig.save(MainConfigFile);
// 		} catch (IOException e) {
// 			Bukkit.getServer().getLogger().log(Level.SEVERE, "Could not save " + MainConfigFile + ".", e);
// 		}
// 	}
// 
// 	// Reloads the config
// 	public static void reloadConfig() {
// 		MainConfigFile = new File(plugin.getDataFolder(), "config.yml");
// 		if (!MainConfigFile.exists()) {
// 			plugin.saveResource("config.yml", false);
// 		}
// 		MainConfig = YamlConfiguration.loadConfiguration(MainConfigFile);
// 		InputStream configData = plugin.getResource("config.yml");
// 		if (configData != null) {
// 			MainConfig.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(configData)));
// 		}
// 	}
// 
// 	public static Component getConfigMessage(String message) {
// 		String oldConfigMessage = getOldConfigMessage(message);
// 		return MiniMessage.get().parse(oldConfigMessage);
// 	}
// 
// 	private static String getOldConfigMessage(String message) {
// 		String messageFromConfig = getConfig().getString("Messages." + message);
// 		if (messageFromConfig == null) {
// 			return ChatColor.RED + "Messages. " + message + " is not set in the config.";
// 		}
// 		if (TreysDoubleJump.canUseHexColorCode()) {
// 			messageFromConfig = translateHexCodes(messageFromConfig);
// 		}
// 		return ChatColor.translateAlternateColorCodes('&', messageFromConfig);
// 	}
// 
// 	static final Pattern hexPattern = Pattern.compile("#([A-Fa-f0-9]{6})");
// 	static final char COLOR_CHAR = ChatColor.COLOR_CHAR;
// 
// 	// Thank you https://www.spigotmc.org/threads/hex-color-code-translate.449748/#post-3867804
// 	public static String translateHexCodes(String text) {
// 		Matcher matcher = hexPattern.matcher(text);
// 		StringBuffer buffer = new StringBuffer(text.length() + 4 * 8);
// 		while (matcher.find())
// 		{
// 			String group = matcher.group(1);
// 			matcher.appendReplacement(buffer, COLOR_CHAR + "x"
// 					+ COLOR_CHAR + group.charAt(0) + COLOR_CHAR + group.charAt(1)
// 					+ COLOR_CHAR + group.charAt(2) + COLOR_CHAR + group.charAt(3)
// 					+ COLOR_CHAR + group.charAt(4) + COLOR_CHAR + group.charAt(5)
// 			);
// 		}
// 		return matcher.appendTail(buffer).toString();
// 	}
// }


import me.treyruffy.treysdoublejump.nmsreference.ParticlesMain;
import me.treyruffy.treysdoublejump.util.ConfigManager;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
package me.treyruffy.treysdoublejump;


/**
 * Created by TreyRuffy on 01/26/2020.
 */

public class Particle_1_16_R3 implements ParticlesMain {

	// Sets particles for 1.16.4+
	@Override
	public void sendParticle(Player p, String particle, Location loc, int amount, float r, float g, float b) {
// Path: NmsReference/src/main/java/me/treyruffy/treysdoublejump/nmsreference/ParticlesMain.java
// public interface ParticlesMain {
// 
// 	// Interface for all versions 1.8 - 1.16.4+
// 	void sendParticle(Player p, String particle, Location loc, int amount, float r, float g, float b);
// 	
// }
// 
// Path: TreysDoubleJump/src/main/java/me/treyruffy/treysdoublejump/util/ConfigManager.java
// public class ConfigManager {
// 
// 	// Accesses the main class
// 	private static final TreysDoubleJump plugin = TreysDoubleJump.getInstance();
// 	
// 	// Accesses the configuration
// 	public static FileConfiguration MainConfig;
// 
// 	// Accesses the configuration file
// 	public static File MainConfigFile;
// 
// 	// Gets the config
// 	public static FileConfiguration getConfig() {
// 		if (MainConfig == null) {
// 			reloadConfig();
// 		}
// 		return MainConfig; 
// 	}
// 
// 	// Saves the config
// 	public static void saveConfig() {
// 		if (MainConfig == null) {
// 			throw new NullArgumentException("Cannot save a non-existent file!");
// 		}
// 		try {
// 			MainConfig.save(MainConfigFile);
// 		} catch (IOException e) {
// 			Bukkit.getServer().getLogger().log(Level.SEVERE, "Could not save " + MainConfigFile + ".", e);
// 		}
// 	}
// 
// 	// Reloads the config
// 	public static void reloadConfig() {
// 		MainConfigFile = new File(plugin.getDataFolder(), "config.yml");
// 		if (!MainConfigFile.exists()) {
// 			plugin.saveResource("config.yml", false);
// 		}
// 		MainConfig = YamlConfiguration.loadConfiguration(MainConfigFile);
// 		InputStream configData = plugin.getResource("config.yml");
// 		if (configData != null) {
// 			MainConfig.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(configData)));
// 		}
// 	}
// 
// 	public static Component getConfigMessage(String message) {
// 		String oldConfigMessage = getOldConfigMessage(message);
// 		return MiniMessage.get().parse(oldConfigMessage);
// 	}
// 
// 	private static String getOldConfigMessage(String message) {
// 		String messageFromConfig = getConfig().getString("Messages." + message);
// 		if (messageFromConfig == null) {
// 			return ChatColor.RED + "Messages. " + message + " is not set in the config.";
// 		}
// 		if (TreysDoubleJump.canUseHexColorCode()) {
// 			messageFromConfig = translateHexCodes(messageFromConfig);
// 		}
// 		return ChatColor.translateAlternateColorCodes('&', messageFromConfig);
// 	}
// 
// 	static final Pattern hexPattern = Pattern.compile("#([A-Fa-f0-9]{6})");
// 	static final char COLOR_CHAR = ChatColor.COLOR_CHAR;
// 
// 	// Thank you https://www.spigotmc.org/threads/hex-color-code-translate.449748/#post-3867804
// 	public static String translateHexCodes(String text) {
// 		Matcher matcher = hexPattern.matcher(text);
// 		StringBuffer buffer = new StringBuffer(text.length() + 4 * 8);
// 		while (matcher.find())
// 		{
// 			String group = matcher.group(1);
// 			matcher.appendReplacement(buffer, COLOR_CHAR + "x"
// 					+ COLOR_CHAR + group.charAt(0) + COLOR_CHAR + group.charAt(1)
// 					+ COLOR_CHAR + group.charAt(2) + COLOR_CHAR + group.charAt(3)
// 					+ COLOR_CHAR + group.charAt(4) + COLOR_CHAR + group.charAt(5)
// 			);
// 		}
// 		return matcher.appendTail(buffer).toString();
// 	}
// }


// Path: TreysDoubleJump/src/main/java/me/treyruffy/treysdoublejump/Particle_1_16_R3.java
import me.treyruffy.treysdoublejump.nmsreference.ParticlesMain;
import me.treyruffy.treysdoublejump.util.ConfigManager;
import org.bukkit.Color;
import org.bukkit.Location;
import org.bukkit.Particle;
import org.bukkit.entity.Player;

package me.treyruffy.treysdoublejump;


/**
 * Created by TreyRuffy on 01/26/2020.
 */

public class Particle_1_16_R3 implements ParticlesMain {

	// Sets particles for 1.16.4+
	@Override
	public void sendParticle(Player p, String particle, Location loc, int amount, float r, float g, float b) {
		if (ConfigManager.getConfig().getBoolean("Particles.AllPlayers")) {