Duels icon indicating copy to clipboard operation
Duels copied to clipboard

Issue with shift-clicking to open container while dueling

Open AerWyn81 opened this issue 5 years ago • 4 comments

Hello, I use CMI which allows, among other things, to open a shulkerbox by shift-clicking. When a player is in combat and tries to open the shulkerbox, it refuses, fine. When the duel is over, the player can no longer re-open his shulkerbox and must disconnect to re-open it. When the player re-opens the shulkerbox, all the contents has disappeared. Is there any way to fix this? Should I check with you or CMI?

AerWyn81 avatar May 07 '20 20:05 AerWyn81

It seems like an issue with CMI. The dev will probably need to check if the box has successfully opened by listening for interactions with the inventory or cancellation of InventoryOpenEvent.

Realizedd avatar May 07 '20 21:05 Realizedd

Hi, CMI does not manage the inventories as they answered me on their git, it only opens the shulkerbox. I configured a server with only CMI/Duels plugins. As enabled on our server :

duel:
  use-own-inventory:
    # If set to 'true', player's own inventory will be used in a duel instead of kits.
    # NOTE: If this option is enabled, Kit Selector will be inaccessible in the Setting GUI.
    # default: false
    enabled: true

    # If set to 'true', players will keep their inventory items on death.
    # default: false
    keep-items: true

I think it's an issue when the plugin tries to restore the inventory, it doesn't seem to restore the shulkerbox inventory.

AerWyn81 avatar May 08 '20 18:05 AerWyn81

With use-own-inventory set to true, there isn't really a restoration process by Duels, so that can't be the issue. Could you check if players are able to open the box with contents by placing it on the ground after the duel? It would be a simple way to check my assumption.

Realizedd avatar May 08 '20 20:05 Realizedd

I just tried it. Indeed, after the duel if I place the shulker on the ground, there are the contents. On the other hand, if I disconnect after the duel and reconnect, the contents are empty.

AerWyn81 avatar May 08 '20 22:05 AerWyn81