Skip to content

[Bug]: NoSuchMethodError: Inventory.getHolder(boolean) in InventoryMoveItemEvent #864

@Ande-ZH

Description

@Ande-ZH

Arclight Version: luminara-1.20.1-1.0.14-3da937c

CoreProtect Version: 23.1

Java Version: 21
When using CoreProtect 23.1 on Luminara 1.20.1, a java.lang.NoSuchMethodError is thrown whenever an InventoryMoveItemEvent occurs (e.g., hoppers moving items). It seems CoreProtect is attempting to call the Paper-specific method org.bukkit.inventory.Inventory.getHolder(boolean), which appears to be missing or not properly mapped in the current build.
Steps to reproduce

  1. Install Luminara 1.20.1.
  2. Install CoreProtect v23.1.CE
  3. Place a hopper and let it move an item.
  4. Check the console for the stack trace.
    Error Log:
    [22:26:23 ERROR] [Minecraft] Could not pass event InventoryMoveItemEvent to CoreProtect v23.1
    org.bukkit.event.EventException: null
    ...
    Caused by: java.lang.NoSuchMethodError: 'org.bukkit.inventory.InventoryHolder org.bukkit.inventory.Inventory.getHolder(boolean)'
    at net.coreprotect.paper.PaperHandler.getHolder(PaperHandler.java:23) ~[?:?]
    at net.coreprotect.listener.player.InventoryChangeListener.onInventoryMoveItemEvent(InventoryChangeListener.java:506) ~[?:?]

This method getHolder(boolean) was introduced by Paper to avoid unneccessary snapshot creation. It seems CoreProtect detects the server as a Paper-compatible environment but the specific method is unreachable, causing the plugin listener to fail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions