<commit_before>package com.topcat.npclib.nms;

import java.io.IOException;
import java.lang.reflect.Field;

import net.minecraft.server.v1_5_R2.Connection;
import net.minecraft.server.v1_5_R2.ConsoleLogManager;
import net.minecraft.server.v1_5_R2.NetworkManager;
import net.minecraft.server.v1_5_R2.Packet;

/**
 *
 * @author martin
 */
public class NPCNetworkManager extends NetworkManager {

	NPCEntity npc;
	
	public NPCNetworkManager() throws IOException {
		//ConsoleLogManager, when declared in this way, creates 2 new files every load of plugin
		super(new ConsoleLogManager("NPC Manager", (String) null, (String) null), new NullSocket(), "NPC Manager", new Connection() {
			@Override
			public boolean a() {
				return true;
			}
		}, null);
		try {
			Field f = NetworkManager.class.getDeclaredField("n");
			f.setAccessible(true);
			f.set(this, false);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Override
	public void a(Connection nethandler) {
	}

	@Override
	public void queue(Packet packet) {<commit_msg>Fully updated to 1.5.1, extra file problem is gone<commit_after>package com.topcat.npclib.nms;

import java.io.IOException;
import java.lang.reflect.Field;

import net.minecraft.server.v1_5_R2.Connection;
import net.minecraft.server.v1_5_R2.MinecraftServer;
import net.minecraft.server.v1_5_R2.NetworkManager;
import net.minecraft.server.v1_5_R2.Packet;

/**
 *
 * @author martin
 */
public class NPCNetworkManager extends NetworkManager {

	NPCEntity npc;
	
	public NPCNetworkManager() throws IOException {
		//ConsoleLogManager, when declared in this way, creates 2 new files every load of plugin
		super(MinecraftServer.getServer().getLogger(), new NullSocket(), "NPC Manager", new Connection() {
			@Override
			public boolean a() {
				return true;
			}
		}, null);
		try {
			Field f = NetworkManager.class.getDeclaredField("n");
			f.setAccessible(true);
			f.set(this, false);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	@Override
	public void a(Connection nethandler) {
	}

	@Override
	public void queue(Packet packet) {
{'fraction_non_alphanumeric': 0.11394230769230769, 'fraction_numerical': 0.013942307692307693, 'mean_word_length': 4.405194805194805, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '368535', 'n_tokens_mistral': 741, 'n_tokens_neox': 685, 'n_words': 166}