<commit_before>package ru.BeYkeRYkt.ProtocolSupportVersionControl;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;

import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import protocolsupport.api.ProtocolSupportAPI;
import protocolsupport.api.ProtocolVersion;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.WrappedChatComponent;

public class ProtocolSupportVersionControl extends JavaPlugin {

	private List<Integer> versions;
	private List<Integer> entities;

	private static ProtocolSupportVersionControl plugin;
	private String kickMessage;
	private ProtocolManager manager;

	private String minMinecraftVersion;
	private int minProtocolVersion;

	private String maxMinecraftVersion;
	private int maxProtocolVersion;
	private String versionMsg;

	@SuppressWarnings("static-access")
	@Override
	public void onEnable() {
		this.plugin = this;
		this.versions = new ArrayList<Integer>();
		this.entities = new ArrayList<Integer>();
		FileConfiguration fc = getConfig();
		try {
			if (!new File(getDataFolder(), "config.yml").exists()) {
				fc.options().header("ProtocolSupportVersionControl (PSVC) v" + getDescription().getVersion() + " Configuration" + "\nHave fun :3" + "\nby BeYkeRYkt" + "\nSupported protocol versions: " + "\n- 61 (1.5.2)" + "\n- 74 (1.6.2)" + "\n- 78 (1.6.4)" + "\n- 4 (1.7.5)" + "\n- 5 (1.7.10)" + "\n- 47 (1.8)" + "\nReplacers formula:" + "\n- ProtocolVersion : oldID : newID");
				// protocol versions
				List<Integer> versions = new ArrayList<Integer>();
				versions.add(51); // 1.4.7
				versions.add(60); // 1.5.1
				versions.add(61); // 1.5.2
				versions.add(73); // 1.6.1
				versions.add(74); // 1.6.2
				versions.add(78); // 1.6.4
				versions.add(4); // 1.7.5
				versions.add(5); // 1.7.10
				versions.add(47); // 1.8
				fc.set("SupportProtocolVersions", versions);

				// block replacer
				List<String> block = new ArrayList<String>();
				block.add("61:95:20"); // ProtocolVersion:oldID:newID
				fc.set("ReplaceBlockIDs", block);

				// item replacer
				List<String> item = new ArrayList<String>();
				item.add("61:95:20"); // ProtocolVersion:oldID:newID
				fc.set("ReplaceItemIDs", item);

				// living entity spawn block
				List<Integer> livingIds = new ArrayList<Integer>();
				livingIds.add(0);
				fc.set("EntitySpawnBlock", livingIds);

				fc.set("Messages.kick", "Your version of game is not supported on this server. \nActual versions: &a%VERSIONS%");
				saveConfig();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		this.manager = ProtocolLibrary.getProtocolManager();<commit_msg>Change config.yml replacer Version<commit_after>package ru.BeYkeRYkt.ProtocolSupportVersionControl;

import java.io.File;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;

import org.bukkit.ChatColor;
import org.bukkit.configuration.file.FileConfiguration;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import protocolsupport.api.ProtocolSupportAPI;
import protocolsupport.api.ProtocolVersion;

import com.comphenix.protocol.PacketType;
import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import com.comphenix.protocol.events.ListenerPriority;
import com.comphenix.protocol.events.PacketAdapter;
import com.comphenix.protocol.events.PacketContainer;
import com.comphenix.protocol.events.PacketEvent;
import com.comphenix.protocol.wrappers.WrappedChatComponent;

public class ProtocolSupportVersionControl extends JavaPlugin {

	private List<Integer> versions;
	private List<Integer> entities;

	private static ProtocolSupportVersionControl plugin;
	private String kickMessage;
	private ProtocolManager manager;

	private String minMinecraftVersion;
	private int minProtocolVersion;

	private String maxMinecraftVersion;
	private int maxProtocolVersion;
	private String versionMsg;

	@SuppressWarnings("static-access")
	@Override
	public void onEnable() {
		this.plugin = this;
		this.versions = new ArrayList<Integer>();
		this.entities = new ArrayList<Integer>();
		FileConfiguration fc = getConfig();
		try {
			if (!new File(getDataFolder(), "config.yml").exists()) {
				fc.options().header("ProtocolSupportVersionControl (PSVC) v" + getDescription().getVersion() + " Configuration" + "\nHave fun :3" + "\nby BeYkeRYkt" + "\nSupported protocol versions: " + "\n- 61 (1.5.2)" + "\n- 74 (1.6.2)" + "\n- 78 (1.6.4)" + "\n- 4 (1.7.5)" + "\n- 5 (1.7.10)" + "\n- 47 (1.8)" + "\nReplacers formula:" + "\n- ProtocolVersion : oldID : newID");
				// protocol versions
				List<Integer> versions = new ArrayList<Integer>();
				versions.add(51); // 1.4.7
				versions.add(60); // 1.5.1
				versions.add(61); // 1.5.2
				versions.add(73); // 1.6.1
				versions.add(74); // 1.6.2
				versions.add(78); // 1.6.4
				versions.add(4); // 1.7.5
				versions.add(5); // 1.7.10
				versions.add(47); // 1.8
				fc.set("SupportProtocolVersions", versions);

				// block replacer
				List<String> block = new ArrayList<String>();
				block.add("51:95:20"); // ProtocolVersion:oldID:newID
				fc.set("ReplaceBlockIDs", block);

				// item replacer
				List<String> item = new ArrayList<String>();
				item.add("51:95:20"); // ProtocolVersion:oldID:newID
				fc.set("ReplaceItemIDs", item);

				// living entity spawn block
				List<Integer> livingIds = new ArrayList<Integer>();
				livingIds.add(0);
				fc.set("EntitySpawnBlock", livingIds);

				fc.set("Messages.kick", "Your version of game is not supported on this server. \nActual versions: &a%VERSIONS%");
				saveConfig();
			}
		} catch (Exception e) {
			e.printStackTrace();
		}

		this.manager = ProtocolLibrary.getProtocolManager();
{'fraction_non_alphanumeric': 0.14285714285714285, 'fraction_numerical': 0.02744148506860371, 'mean_word_length': 4.2821824381926685, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, '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': '3754543', 'n_tokens_mistral': 2212, 'n_tokens_neox': 1930, 'n_words': 422}