<commit_before>package com.github.Kory33.minecartchestfilter.util.inventory;

import org.bukkit.entity.minecart.StorageMinecart;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;

public class FilteredInventoryUtil {
    public static void processFilteredInventoryClick(InventoryClickEvent event){
        Inventory clickedInventory = event.getClickedInventory();
        
        boolean isClickedBottom = clickedInventory.equals(event.getView().getBottomInventory());
        boolean isClickedTop = clickedInventory.equals(event.getView().getTopInventory());
        
        ItemStack filterCheckTarget = null;
        
        // if the item is moved by shift click
        if(event.isShiftClick() && isClickedBottom){
            filterCheckTarget = event.getCursor();
        }
        
        // if the item is moved by left click
        if(event.isLeftClick() && isClickedTop){
            filterCheckTarget = event.getCurrentItem();
        }
        
        // if the item is not being moved
        if(filterCheckTarget == null){
            return;
        }
        
        boolean isISFiltered = FilteredInventoryUtil.isFiltered(filterCheckTarget, (StorageMinecart)clickedInventory.getHolder());
        event.setCancelled(isISFiltered);

        return;
    }

    private static boolean isFiltered(ItemStack filterCheckTarget, StorageMinecart holder) {
        
        return false;
    }
}<commit_msg>added TODO message<commit_after>package com.github.Kory33.minecartchestfilter.util.inventory;

import org.bukkit.entity.minecart.StorageMinecart;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.ItemStack;

public class FilteredInventoryUtil {
    public static void processFilteredInventoryClick(InventoryClickEvent event){
        Inventory clickedInventory = event.getClickedInventory();
        
        boolean isClickedBottom = clickedInventory.equals(event.getView().getBottomInventory());
        boolean isClickedTop = clickedInventory.equals(event.getView().getTopInventory());
        
        ItemStack filterCheckTarget = null;
        
        // if the item is moved by shift click
        if(event.isShiftClick() && isClickedBottom){
            filterCheckTarget = event.getCursor();
        }
        
        // if the item is moved by left click
        if(event.isLeftClick() && isClickedTop){
            filterCheckTarget = event.getCurrentItem();
        }
        
        // if the item is not being moved
        if(filterCheckTarget == null){
            return;
        }
        
        boolean isISFiltered = FilteredInventoryUtil.isFiltered(filterCheckTarget, (StorageMinecart)clickedInventory.getHolder());
        event.setCancelled(isISFiltered);

        return;
    }

    private static boolean isFiltered(ItemStack filterCheckTarget, StorageMinecart holder) {
        //TODO implementation
        return false;
    }
}
{'fraction_non_alphanumeric': 0.08294930875576037, 'fraction_numerical': 0.0013166556945358788, 'mean_word_length': 2.837121212121212, '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': '4446461', 'n_tokens_mistral': 827, 'n_tokens_neox': 813, 'n_words': 162}