<commit_before>package me.otisdiver.otisprojectile.targeting;

import java.lang.ref.WeakReference;

import org.bukkit.Bukkit;
import org.bukkit.entity.Projectile;

import me.otisdiver.otisprojectile.OtisProjectile;

public abstract class Targeter {
    
    // Running instance of the JavaPlugin.
    protected OtisProjectile main = null;
    
    // The serviced projectile.
    protected Projectile projectile = null;
    
    // Currently running targeting task ID.
    private int targetingTask = 0;
    
    public Targeter(OtisProjectile main, Projectile projectile) {
        this.main = main;
        this.projectile = projectile;
    }
    
    /** Check if the projectile is gone (marked for removal or removed).
     * 
     * @return true, if the entity is gone
     */
    protected boolean isProjectileGone() {
        if (projectile == null) return true;
        return (projectile.isDead() && !projectile.isValid());
    }
    
    /** Check if a targeting task has been started.
     * 
     * @return true, if no targeting task ID has been saved.
     */
    protected boolean isTargetingTaskRunning() {
        return targetingTask != 0;
    }<commit_msg>Change access modifier on targeting task in Targeter Expanded from private to protected<commit_after>package me.otisdiver.otisprojectile.targeting;

import java.lang.ref.WeakReference;

import org.bukkit.Bukkit;
import org.bukkit.entity.Projectile;

import me.otisdiver.otisprojectile.OtisProjectile;

public abstract class Targeter {
    
    // Running instance of the JavaPlugin.
    protected OtisProjectile main = null;
    
    // The serviced projectile.
    protected Projectile projectile = null;
    
    // Currently running targeting task ID.
    protected int targetingTask = 0;
    
    public Targeter(OtisProjectile main, Projectile projectile) {
        this.main = main;
        this.projectile = projectile;
    }
    
    /** Check if the projectile is gone (marked for removal or removed).
     * 
     * @return true, if the entity is gone
     */
    protected boolean isProjectileGone() {
        if (projectile == null) return true;
        return (projectile.isDead() && !projectile.isValid());
    }
    
    /** Check if a targeting task has been started.
     * 
     * @return true, if no targeting task ID has been saved.
     */
    protected boolean isTargetingTaskRunning() {
        return targetingTask != 0;
    }
{'fraction_non_alphanumeric': 0.08250825082508251, 'fraction_numerical': 0.0016501650165016502, 'mean_word_length': 2.6910197869101977, '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': '417885', 'n_tokens_mistral': 709, 'n_tokens_neox': 673, 'n_words': 214}