Minepacks

Minepacks

2M Downloads

ERROR Could not pass event InventoryDragEvent

DrJekyllH opened this issue ยท 0 comments

commented

Information

Environment information
Plugin + server version info:


[16:52:36 INFO]: ##### Start Minepacks version info #####
[16:52:36 INFO]: Minepacks: 2.4.31.4-T20240629215752
[16:52:36 INFO]: Server: 1.21-130-b1b5d4c (MC: 1.21)
[16:52:36 INFO]: Java: 21.0.4
[16:52:36 INFO]: #####  End Minepacks version info  #####

Online mode: yes

BungeeCord: no

Server/crash log


[16:49:41 ERROR]: Could not pass event InventoryDragEvent to Minepacks v2.4.31.4-T20240629215752
java.lang.IncompatibleClassChangeError: Found interface org.bukkit.inventory.InventoryView, but class was expected
        at Minepacks.jar/at.pcgamingfreaks.MinepacksStandalone.Bukkit.Listener.ItemFilter.onItemDrag(ItemFilter.java:132) ~[Minepacks.jar:?]
        at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor852.execute(Unknown Source) ~[?:?]
        at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:84) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:1.21-130-b1b5d4c]
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[paper-api-1.21-R0.1-SNAPSHOT.jar:?]
        at net.minecraft.world.inventory.AbstractContainerMenu.doClick(AbstractContainerMenu.java:480) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.world.inventory.AbstractContainerMenu.clicked(AbstractContainerMenu.java:382) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3059) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:56) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.TickTask.run(TickTask.java:18) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1537) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:201) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1514) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1507) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.managedBlock(MinecraftServer.java:1466) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1473) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1318) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:330) ~[paper-1.21.jar:1.21-130-b1b5d4c]
        at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

Plugin config (optional)


# Minepacks Config File

# Language Settings
Language:
  # Defines the used language, and the corresponding file used. The corresponding language file will be placed in the lang folder next to the config.yml named: <Language>.yml
  Language: ja
  # Options:
  #     Overwrite (deletes all changes from the file and extracts a new language file)
  #     Upgrade (extracts a new language file and copy's all settings from the old language file)
  #     Update (adds the default (english) text values for all missing values, just some basic formatting)
  UpdateMode: Upgrade

# Title to be shown for the opened inventory for everyone except the owner of the backpack. Can contain {OwnerName} (which will be replaced with the players name).
BackpackTitleOther: "&b{OwnerName}'s Backpack"
# The title of the inventory for the owner of the backpack.
BackpackTitle: "Backpack"
# Defines if the content of the backpack get dropped on the death of a player.
# If enabled, it can be disabled for individual players with the "backpack.keepOnDeath" permission.
DropOnDeath: true
# If this option is enabled the backpack will not drop if the keepInventory flag for the death event is set.
# This should add compatibility with plugins protecting the players inventory on death (like SaveRod). But might prevent the backpack form dropping on death with some plugins.
HonorKeepInventoryOnDeath: false
# Defines the max amount of columns for a backpack.
# The size of the user's backpack will be defined by the permission, permissions for bigger backpacks than this value will be ignored.
# Can be set to anything > 0. Backpacks with more than 6 columns will have a broken UI! Sizes bigger than 9 may not work with all permission plugins.
MaxSize: 6
# Defines how backpacks get compressed when the previous permissions allowed for a bigger backpack.
# Options:
#   Fast: Only free slots will be used
#   Compress: The plugin will try to combine item stacks to their max height
#   Sort: The plugin will sort the backpack, will leave the same amount of items that do not fit in the backpack as compress, but will leave a sorted backpack, at the cost of some extra performance
ShrinkApproach: Sort
# Defines in which game-modes a player can access his backpack (name or id)
# Options: ADVENTURE, CREATIVE, SPECTATOR, SURVIVAL
# AllowedGameModes: [ "SURVIVAL", "ADVENTURE" ]
AllowedGameModes: ["SURVIVAL", "CREATIVE"]

Cooldown:
  # Defines how long a player have to wait till he can reopen his backpack.
  # Time is in seconds. Values < 1 disable the cooldown.
  Command: -1
  # If enabled, cooldowns will be synced between servers (BungeeCord network). It will also allow keeping the cooldown through server restarts.
  # You should only use it with long cooldown times.
  Sync: false
  AddOnJoin: true
  # You can turn this on when using sync to reduce the memory consumption a little
  ClearOnLeave: false
  # Removes old cooldowns from the cache to free memory. Time in seconds.
  CleanupInterval: 600

# Controls for the auto pickup on full inventory function
FullInventory:
  # If items should be collected to the backpack if the players inventory is full.
  # This is also the default if 'IsToggleAllowed' is enabled.
  CollectItems: false
  # Interval in seconds how often items around the player should be collected, increase it if it lags the server
  CheckInterval: 1
  # Radius in which items get collected, in meter/blocks, allow decimals
  CollectRadius: 1.5
  # If this feature may be toggled.
  IsToggleAllowed: false

# Database settings
Database:
  # Database type. MySQL, SQLite, Files (data is stored in files, one file per user) or Shared (use shared connection pool from PCGF PluginLib)
  Type: SQLite
  # Auto database cleanup settings
  AutoCleanup:
    # Defines the max amount of days backpacks will be stored. -1 to disable auto cleanup
    MaxInactiveDays: -1
  # Defines the storage format for UUIDs for compatibility with other plugins (shared tables)
  # true: format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
  # false: format: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  UseUUIDSeparators: false
  # Options: auto, online, offline | auto will decide based on the server online mode option.
  # If you are using BungeeCord, set it to whatever you use on your BungeeCord server!!!
  UUID_Type: auto
  # If enabled the backpack will be saved regardless of if there have been changes to it or not. This will slightly negatively impact performance.
  # This will help with changes made to items inside the backpack by other plugins. For example plugins that allow you to interact with items, when you allow your players to store these items inside the backpack.
  ForceSaveOnUnload: false
  # Settings only for MySQL
  SQL:
    Host: "localhost:3306"
    Database: "minecraft"
    User: "minecraft"
    Password: "minecraft"
    # The max amount of connections to the database the connection pool will open
    MaxConnections: 2
    # Sets the max lifetime of the connection in seconds. -1 = Default (30min)
    MaxLifetime: -1
    # Sets the idle timeout of the connection in seconds. -1 = Default (15min)
    IdleTimeout: -1
    # List of properties for your SQL connection. Can be used to disable SSL.
    # Properties: ["useSSL=false"]
    Properties: []
  # Tables settings for shared tables when using MySQL - Advanced MySQL Settings
  # Use these settings only if you know what you are doing!!!!
  # Do only change these settings if you know what you are doing and have some basic MySQL knowledge!!!
  # Changing settings down here after you have used this plugin may result in data inconsistency!!!
  Tables:
    # Table names
    # Don't change the players table if you have backpacks stored in your database already! Player id's might not match any more resulting data inconsistency.
    User: backpack_players
    Backpack: backpacks
    Cooldown: backpack_cooldowns
    # Field settings for the tables
    # Do not change them after the tables have been generated!
    # If you like to change them after the tables have been generated alter the tables manually or delete them (the system then will regenerate them).
    Fields:
      User:
        Player_ID: player_id
        Name: name
        UUID: uuid
      Backpack:
        Owner_ID: owner
        ItemStacks: itemstacks
        Version: version
        LastUpdate: lastupdate
      Cooldown:
        Player_ID: id
        Time: time
  # Settings controlling the cache behavior of the plugin. You may optimize it a little depending on your player count, ram or cpu bottlenecks.
  Cache:
    UnCache:
      # The strategy used to uncache offline players. Options
      #     interval (offline players get uncached every x seconds)
      #     intervalChecked (like interval, but also ensures that the player is already offline for at least the interval time, adds a cpu overhead)
      #     ondisconnect (player instantly gets uncached as soon as he disconnects, may adds overhead if other plugins try to access the player data when they go offline, also it may be problematic for players with unstable connections)
      #     ondisconnectdelayed (player gets uncached x seconds after he went offline, adds overhead on disconnect, you shouldn't use this with a lot of players joining and leaving.)
      Strategy: interval
      # Used for the interval based uncaching algorithms, and is also used as delay for ondisconnectdelayed. Value in seconds. Default: 600 = 10 minutes
      Interval: 600
      Delay: 600

Shulkerboxes:
  # This setting controls whether players can put shulkerboxes into their backpacks.
  PreventInBackpack: false
  # This setting allows disabling shulkerboxes all together. Players won't be able to craft or use them.
  DisableShulkerboxes: false
  # This setting controls how existing shulkerboxes are handled if they are disabled.
  # Options: Ignore, Remove = shulker-box will be removed including its content, Destroy = shulker-box will be destroyed, and it's content will be dropped
  Existing: "Ignore"

ItemFilter:
  # Enables the item filter. Make sure to define items to be filtered.
  Enabled: true
  # Changes the filter mode, either blacklist (only unlisted materials are allowed) or whitelist (only listed materials are allowed)
  Mode: whitelist
  # Filter lists bellow. An item will be blocked (in blacklist mode) or allowed (in whitelist mode) if it matches on of the given filters.
  # List of materials that should be filtered. Can be name or id (id only for MC versions older than 1.13!).
  Materials: [RECOVERY_COMPASS]
  # List of names that should be filtered. Must match the display name of the item exactly. & color codes will be converted automatically.
  Names: []
  # List of lore that should be filtered. Can be a single line or all lines of the lore.
  Lore: []

# These settings allow control over how the plugin behave in different worlds
WorldSettings:
  # Options: blacklist (all worlds listed in FilteredWorlds will be blocked), whitelist (all worlds listed in FilteredWorlds will be allowed)
  FilterType: "blacklist"
  # All worlds listed here will not have the plugin usable
  # FilteredWorlds: ["creative_world"]
  # FilteredWorlds: ["creative_world1", "creative_world2"]
  FilteredWorlds: [world_test]
  # Defines how the Blacklist will be enforced
  # Options:
  #   Message           = The player will see a message that the usage of the backpack is not allowed in this world.
  #   MissingPermission = The player will receive the plugins no permission message.
  #   NoPlugin          = The plugin will not be available at all and act as if it was not installed.
  #                       This also exclude players with permission to bypass the world restriction from using it!
  #                       It will not disable the Shulkerboxes filter!
  BlockMode: "Message"

# Gives the players an item they can interact with to open their backpack. Only works on MC 1.8 or newer.
ItemShortcut:
  # If enabled the players will be given an item they can interact with to open the backpack.
  # The item may not be removed from their inventory as long as this option is enabled.
  Enabled: false
  # The name of the item in the inventory
  ItemName: "&eBackpack"
  # The texture value for the head.
  # Heads can be found here: https://minecraft-heads.com/custom-heads/
  # The correct value is the one listed on the head page under Other/Value
  HeadTextureValue: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOGRjYzZlYjQwZjNiYWRhNDFlNDMzOTg4OGQ2ZDIwNzQzNzU5OGJkYmQxNzVjMmU3MzExOTFkNWE5YTQyZDNjOCJ9fX0="
  # Increases compatibility with some death chest plugins. Enable this if the backpack item gets added to your death chest!
  # Please note: This will not move items from the backpack to the death chest! The items in the backpack will still drop to the ground unless DropOnDeath is disabled.
  ImproveDeathChestCompatibility: false
  # Prevents the backpack from being used as a hat
  BlockAsHat: true
  # Opens a container if right-clicked while holding the backpack shortcut in the hand. This option will only work on MC 1.13 or newer.
  OpenContainerOnRightClick: true
  # The id of the slot that should be preferred when giving a player the shortcut item
  PreferredSlotId: -1
  # If this option is enabled the player will not be able to move the backpack item within their inventory
  BlockItemFromMoving: false

Sound:
  # Enables all sound effects
  Enabled: false
  # The sound effect that should be played when the backpack is opened
  # disabled or false to disable the sound effect
  # auto will play the chest sound for minecraft versions older than 1.11, and the shulker-box sound for newer MC versions
  OpenSound: auto
  # The sound effect that should be played when the backpack is closed
  # disabled or false to disable the sound effect
  # auto will play the chest sound for minecraft versions older than 1.11, and the shulker-box sound for newer MC versions
  CloseSound: auto

# Settings for the inventory management
InventoryManagement:
  ClearCommand:
    # If enabled the plugin provides an inventory clear command that keeps the backpack item.
    Enabled: true

Misc:
  AutoUpdate:
    # When auto update is disabled you still can use the build in update function manually with /backpack update
    Enabled: true
    Channel: Release
  # Enable this option if you are using a BungeeCord setup and want to share the plugin's database across multiple servers.
  UseBungeeCord: false

# Config file version. Don't touch it!
Version: 34


Details

Description
Opening the backpack and moving an item to a different slot in the player's inventory rarely causes an error. Items can be moved.

Steps to reproduce

  1. open a backpack as a user
  2. drag an item stuck from a slot in player inventory to another slot in the inventory

Expected behavior
no error displayed on the console.

Other information (e.g. detailed explanation, related issues, suggestions how to fix, links for us to have context, screenshots, etc.)
image