<commit_before>package com.graywolf336.trailingperspective.workers;

import org.bukkit.ChatColor;

import com.graywolf336.trailingperspective.TrailingPerspectiveMain;
import com.graywolf336.trailingperspective.enums.Settings;
import com.graywolf336.trailingperspective.interfaces.ITrailer;
import com.graywolf336.trailingperspective.interfaces.ITrailerWorker;

public class HomeSendingWorker implements ITrailerWorker {
    private TrailingPerspectiveMain pl;
    
    public HomeSendingWorker(TrailingPerspectiveMain plugin) {
        this.pl = plugin;
        this.pl.getLogger().info("HomeSendingWorker started.");
    }

    public void run() {
        if(Settings.HOME_LOCATION.asLocation() == null) return;
        
        for(ITrailer trailer : this.pl.getTrailerManager().getTrailers()) {
            if(trailer.isOnline() && !trailer.isCurrentlyTrailingSomeone() && !trailer.wasSentHome()) {
                trailer.getPlayer().teleport(Settings.HOME_LOCATION.asLocation());
                trailer.setWhetherTheyHaveBeenSentHome(true);
                
                trailer.getPlayer().sendMessage(ChatColor.AQUA + "You've been sent home as there is no one to trail currently.");
            }
        }
    }
}<commit_msg>Fix the home sending worker being too generic on how it sends people home<commit_after>package com.graywolf336.trailingperspective.workers;

import org.bukkit.ChatColor;

import com.graywolf336.trailingperspective.TrailingPerspectiveMain;
import com.graywolf336.trailingperspective.enums.Settings;
import com.graywolf336.trailingperspective.interfaces.ITrailer;
import com.graywolf336.trailingperspective.interfaces.ITrailerWorker;

public class HomeSendingWorker implements ITrailerWorker {
    private TrailingPerspectiveMain pl;
    
    public HomeSendingWorker(TrailingPerspectiveMain plugin) {
        this.pl = plugin;
        this.pl.getLogger().info("HomeSendingWorker started.");
    }

    public void run() {
        if(Settings.HOME_LOCATION.asLocation() == null) return;
        
        for(ITrailer trailer : this.pl.getTrailerManager().getTrailers()) {
            if(trailer.isOnline() && !trailer.isCurrentlyTrailingSomeone() && !trailer.wasSentHome() && this.pl.getServer().getOnlinePlayers().size() <= this.pl.getTrailerManager().getTrailers().size()) {
                trailer.getPlayer().teleport(Settings.HOME_LOCATION.asLocation());
                trailer.setWhetherTheyHaveBeenSentHome(true);
                
                trailer.getPlayer().sendMessage(ChatColor.AQUA + "You've been sent home as there is no one to trail currently.");
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.10170777988614801, 'fraction_numerical': 0.011385199240986717, 'mean_word_length': 3.529209621993127, 'pattern_counts': {'":': 0, '<': 4, '<?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': '1796545', 'n_tokens_mistral': 788, 'n_tokens_neox': 734, 'n_words': 123}