<commit_before>package uk.co.eluinhost.UltraHardcore.features.core;

import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Iterator;

import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;

import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import com.comphenix.protocol.events.PacketContainer;

import uk.co.eluinhost.UltraHardcore.UltraHardcore;
import uk.co.eluinhost.UltraHardcore.config.ConfigHandler;
import uk.co.eluinhost.UltraHardcore.config.ConfigNodes;
import uk.co.eluinhost.UltraHardcore.config.PermissionNodes;
import uk.co.eluinhost.UltraHardcore.features.UHCFeature;

public class FootprintFeature extends UHCFeature implements Runnable{

	private static int MAX_RENDER_DISTANCE_SQUARED;
	private static ProtocolManager pm = ProtocolLibrary.getProtocolManager();
	private ArrayList<Footstep> footsteps = new ArrayList<Footstep>();
    private static int MIN_DISTANCE_SQUARED;
	private int jobID = -1;
	
	public FootprintFeature(boolean enabled) {
		super(enabled);
		setDescription("Leave footprints behind you...");
		setFeatureID("Footprints");
		MAX_RENDER_DISTANCE_SQUARED = ConfigHandler.getConfig(ConfigHandler.MAIN).getInt(ConfigNodes.FOOTPRINTS_RENDER_DISTANCE);
		MAX_RENDER_DISTANCE_SQUARED *= MAX_RENDER_DISTANCE_SQUARED;
		MIN_DISTANCE_SQUARED = ConfigHandler.getConfig(ConfigHandler.MAIN).getInt(ConfigNodes.FOOTPRINTS_MIN_DISTANCE);
		MIN_DISTANCE_SQUARED *= MIN_DISTANCE_SQUARED;
	}
	public class Footstep {

		private Location loc;
		private int timeRemaining;
		private String name;
		
		private PacketContainer defaultPacket = pm.createPacket(0x3F);
		
		public Footstep(Location loc,int timeToLast,String name){
			setName(name);
			setLocation(loc);
			setTimeRemaining(timeToLast);<commit_msg>Fixed deprecated way of making the footprints packet<commit_after>package uk.co.eluinhost.UltraHardcore.features.core;

import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Iterator;

import com.comphenix.protocol.PacketType;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.entity.Player;

import com.comphenix.protocol.ProtocolLibrary;
import com.comphenix.protocol.ProtocolManager;
import com.comphenix.protocol.events.PacketContainer;

import uk.co.eluinhost.UltraHardcore.UltraHardcore;
import uk.co.eluinhost.UltraHardcore.config.ConfigHandler;
import uk.co.eluinhost.UltraHardcore.config.ConfigNodes;
import uk.co.eluinhost.UltraHardcore.config.PermissionNodes;
import uk.co.eluinhost.UltraHardcore.features.UHCFeature;

public class FootprintFeature extends UHCFeature implements Runnable{

	private static int MAX_RENDER_DISTANCE_SQUARED;
	private static ProtocolManager pm = ProtocolLibrary.getProtocolManager();
	private ArrayList<Footstep> footsteps = new ArrayList<Footstep>();
    private static int MIN_DISTANCE_SQUARED;
	private int jobID = -1;
	
	public FootprintFeature(boolean enabled) {
		super(enabled);
		setDescription("Leave footprints behind you...");
		setFeatureID("Footprints");
		MAX_RENDER_DISTANCE_SQUARED = ConfigHandler.getConfig(ConfigHandler.MAIN).getInt(ConfigNodes.FOOTPRINTS_RENDER_DISTANCE);
		MAX_RENDER_DISTANCE_SQUARED *= MAX_RENDER_DISTANCE_SQUARED;
		MIN_DISTANCE_SQUARED = ConfigHandler.getConfig(ConfigHandler.MAIN).getInt(ConfigNodes.FOOTPRINTS_MIN_DISTANCE);
		MIN_DISTANCE_SQUARED *= MIN_DISTANCE_SQUARED;
	}
	public class Footstep {

		private Location loc;
		private int timeRemaining;
		private String name;

        private PacketContainer defaultPacket = pm.createPacket(PacketType.Play.Server.WORLD_PARTICLES);
		
		public Footstep(Location loc,int timeToLast,String name){
			setName(name);
			setLocation(loc);
			setTimeRemaining(timeToLast);
{'fraction_non_alphanumeric': 0.08696723330869673, 'fraction_numerical': 0.0009854644000985464, 'mean_word_length': 6.6893939393939394, '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': '6648522', 'n_tokens_mistral': 1404, 'n_tokens_neox': 1296, 'n_words': 224}