Slimefun

Slimefun

3M Downloads

Item will disappear when drop from backpack at region where drop item is not allowed

MrPolloo opened this issue ยท 6 comments

commented

๐Ÿ“ Description (REQUIRED)

When inventory is full and you trying to drop item from backpack at region (WorldGuard) drop item is not allowed will disappear

๐Ÿ“‘ Steps to reproduce the Issue (REQUIRED)

  1. Fill inventory to full
  2. Go to region where dropping item isnt allowed
  3. Open Backpack
  4. Drop some of item

๐Ÿ’ก Expected behavior (REQUIRED)

Usually when dropping item from backpack when inventory is not full, the item will return to your inventory.
But if inventory is full, its should return to the backpack.

๐Ÿ“œ Server Log

๐Ÿ“‚ /error-reports/ Folder

๐Ÿงญ Environment (REQUIRED)

  • Server software: Paper-669
  • Minecraft version: 1.16.5
  • Slimefun version: Slimefun4 - DEV 927 (git cf362)
  • WorldGuard version : worldguard-bukkit-7.0.4
commented
commented

I think this issue must resolve author of worldguard because its works with normal chests too. Checking for cancelled event also dont work

commented

WorldGuard simply cancels the PlayerItemDropEvent.

https://github.com/EngineHub/WorldGuard/blob/0a74d02fc92aa0bfa8ce57a50d76fef14706f256/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java#L915-L917

https://github.com/EngineHub/WorldGuard/blob/0a74d02fc92aa0bfa8ce57a50d76fef14706f256/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/util/Events.java#L73-L81

I reckon this is likely to even be a Paper or Spigot issue at this point, that the item does not seem to be returned to the correct slot.

Can you perhaps test this on Spigot so we can see if it happens there too or only on Paper?

commented

Can you perhaps test this on Spigot so we can see if it happens there too or only on Paper?

Works on Spigot too.

Video: https://youtu.be/ukVsN3hudfI (probably still processing)

commented

Yup, seems to be a Spigot / CraftBukkit bug:

https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/entity/player/EntityHuman.patch#95-117

No matter where the item is dropped from, it seems to always be returned to the player's inventory.
Please report that on the Spigot bug tracker: https://hub.spigotmc.org/jira/ (or see if an open issue about that already exists)

commented