Skip to content

Exception when clicking void slot #4

@Zoriot

Description

@Zoriot

You get an exception when you click on a slot where no item is set

[21:19:00 ERROR]: Could not pass event InventoryClickEvent to BlockPalletGUI v1.0
java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.ItemStack.getType()" because "currentItem" is null
        at org.example.bte.blockPalletGUI.InventoryClickHandler.onInventoryClick(InventoryClickHandler.java:29) ~[BlockPalletGUI-0.1.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor10.execute(Unknown Source) ~[?:?]

Please fix that, should be possible with an early return

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