<commit_before>package org.diorite.event.player;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import org.diorite.entity.Player;
import org.diorite.inventory.ClickType;
import org.diorite.inventory.item.ItemStack;

public class PlayerInventoryClickEvent extends PlayerEvent
{
    protected final int       windowId;
    protected final int       clickedSlot;
    protected final short     actionNumber;
    protected final ClickType clickType;

    protected final ItemStack clickedItem;
    protected final ItemStack cursorItem;

    /**
     * Construct new player event.
     *
     * @param player       player related to event, can't be null.
     * @param actionNumber action number send by client.
     * @param windowId     id of inventory window.
     * @param clickedSlot  clicked slot number.
     * @param clickType    type of click.
     */
    public PlayerInventoryClickEvent(final Player player, final short actionNumber, final int windowId, final int clickedSlot, final ClickType clickType)
    {
        super(player);
        this.windowId = windowId;
        this.clickedSlot = clickedSlot;
        this.actionNumber = actionNumber;
        this.clickType = clickType;

        this.clickedItem = player.getInventory().getItem(clickedSlot);
        this.cursorItem = player.getInventory().getCursorItem();
    }

    public int getWindowId()
    {
        return this.windowId;
    }

    public int getClickedSlot()
    {
        return this.clickedSlot;
    }

    public short getActionNumber()<commit_msg>Playing around eq<commit_after>package org.diorite.event.player;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import org.diorite.entity.Player;
import org.diorite.inventory.ClickType;
import org.diorite.inventory.item.ItemStack;

public class PlayerInventoryClickEvent extends PlayerEvent
{
    protected final int       windowId;
    protected final int       clickedSlot;
    protected final short     actionNumber;
    protected final ClickType clickType;

    protected final ItemStack clickedItem;
    protected final ItemStack cursorItem;

    /**
     * Construct new player event.
     *
     * @param player       player related to event, can't be null.
     * @param actionNumber action number send by client.
     * @param windowId     id of inventory window.
     * @param clickedSlot  clicked slot number.
     * @param clickType    type of click.
     */
    public PlayerInventoryClickEvent(final Player player, final short actionNumber, final int windowId, final int clickedSlot, final ClickType clickType)
    {
        super(player);
        this.windowId = windowId;
        this.clickedSlot = clickedSlot;
        this.actionNumber = actionNumber;
        this.clickType = clickType;

        ItemStack clickedItem;
        try
        {
            clickedItem = player.getInventory().getItem(clickedSlot);
        }
        catch (final IndexOutOfBoundsException ignored)
        {
            clickedItem = null;
        }

        this.clickedItem = clickedItem;
        this.cursorItem = player.getInventory().getCursorItem();
    }

    public int getWindowId()
    {
        return this.windowId;
    }

    public int getClickedSlot()
    {
        return this.clickedSlot;
    }

    public short getActionNumber()
{'fraction_non_alphanumeric': 0.07304194778527427, 'fraction_numerical': 0.0011733646230566149, 'mean_word_length': 2.7679558011049723, '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': '4233429', 'n_tokens_mistral': 918, 'n_tokens_neox': 909, 'n_words': 250}