<commit_before>package xyz.benw.plugins.fouriermc;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;

import java.util.*;

/**
 * ClickListener
 *
 * General event listener for plugin
 *
 */
public class ClickListener implements Listener {

    private FourierMC plugin;

    public ClickListener(FourierMC plugin) {
        this.plugin = plugin;
    }


    /* Logs clicking events */
    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {

        UUID playerID = event.getPlayer().getUniqueId();

        if(plugin.clickLogger.containsKey(playerID)) {
            plugin.clickLogger.get(playerID).increment();
        }


    }


    @EventHandler
    public void onPlayerQuit(PlayerQuitEvent event) {

        UUID playerID = event.getPlayer().getUniqueId();

        if(plugin.clickLogger.containsKey(playerID)) {
            plugin.clickLogger.remove(playerID);
        }
    }




}<commit_msg>Handle players leaving<commit_after>package xyz.benw.plugins.fouriermc;

import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;

import java.util.*;

/**
 * ClickListener
 *
 * General event listener for plugin
 *
 */
public class ClickListener implements Listener {

    private FourierMC plugin;

    public ClickListener(FourierMC plugin) {
        this.plugin = plugin;
    }


    /* Logs clicking events */
    @EventHandler
    public void onPlayerInteract(PlayerInteractEvent event) {
        UUID playerID = event.getPlayer().getUniqueId();

        if(plugin.clickLogger.containsKey(playerID)) {
            plugin.clickLogger.get(playerID).increment();
        }

    }

    @EventHandler
    public void onPlayerQuit(PlayerQuitEvent event) {
        UUID playerID = event.getPlayer().getUniqueId();

        if(plugin.clickLogger.containsKey(playerID)) {
            plugin.clickLogger.remove(playerID);
        }

        if(plugin.violationLogger.containsKey(playerID)) {
            plugin.clickLogger.remove(playerID);
        }
    }

}
{'fraction_non_alphanumeric': 0.10229833258224426, 'fraction_numerical': 0.0, 'mean_word_length': 3.0585009140767823, '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': '6539037', 'n_tokens_mistral': 667, 'n_tokens_neox': 633, 'n_words': 112}