Skip to content

Error in "Logger" Plugin v1.8.0.15 - ArrayIndexOutOfBoundsException during InventoryClickEvent #56

@Mikeliro

Description

@Mikeliro

Describe the bug
When a player has more than 27 inventory backups saved, attempting to view the inventory backup using the plugin "Logger" v1.8.0.15 results in an ArrayIndexOutOfBoundsException. The plugin fails to display the inventory backup,

To Reproduce
Steps to reproduce the behavior:

  1. Tipe /logger:logger playerinventory
  2. Try to view one of the player's inventory backups by clicking on the player's head with more than 27 backups.
  3. The inventory backup fails to display, and the server log shows an ArrayIndexOutOfBoundsException.

Expected behavior
The plugin should be able to handle more than 27 inventory backups and display the inventory backup correctly without throwing exceptions.

Screenshots
N/A (The issue is evident in the server logs provided below.)

Server & Version (please complete the following information):
Version: 1.21.1
Server Type: Purpur (Build 2296-568a028)

[11:14:47 ERROR]: Could not pass event InventoryClickEvent to Logger v1.8.0.15 java.lang.ArrayIndexOutOfBoundsException: Index 27 out of bounds for length 27 at java.base/java.util.Arrays$ArrayList.set(Arrays.java:4271) ~[?:?] at net.minecraft.core.NonNullList.set(NonNullList.java:50) ~[purpur-1.21.1.jar:1.21.1-2296-568a028] at org.bukkit.craftbukkit.inventory.CraftInventoryCustom$MinecraftInventory.setItem(CraftInventoryCustom.java:167) ~[purpur-1.21.1.jar:1.21.1-2296-568a028] at org.bukkit.craftbukkit.inventory.CraftInventory.setItem(CraftInventory.java:100) ~[purpur-1.21.1.jar:1.21.1-2296-568a028] at Logger-1.8.0.15.jar/me.prism3.logger.commands.subcommands.PlayerInventory.stepTwo(PlayerInventory.java:176) ~[Logger-1.8.0.15.jar:?] at Logger-1.8.0.15.jar/me.prism3.logger.commands.subcommands.PlayerInventory.onClick(PlayerInventory.java:113) ~[Logger-1.8.0.15.jar:?] ...
Thank you for addressing this issue. Please let me know if you need any more details or if I can assist further with troubleshooting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions