Closed Fakhri1999 closed 3 years ago
Interesting. I'm reasonably confident that that didn't happen on older versions, pretty much all "duplication" bugs ended up being either conflicts outside of OI's control or creative desync.
This will unfortunately not be an easy fix - OI doesn't reroute logic in a chest inventory, it piggybacks Minecraft's internals to create a container backed by another container's content list (the player inventory, in this case). Because of that, the issue here is caused by sections of code that OI generally has no business messing with.
As a bandaid, deny your untrustworthy players OpenInv.openself
.
can't you add a new if inside your code so when the user shift click, it will suddenly cancel the event? so people can only click without shift
Yes, but that's pretty poor in terms of QoL, the only reason you wouldn't shift-click everything is if you're trying to put something in a specific slot. Since there's a separate permission for opening your own inventory that can very easily be denied, that's an unnecessary and incomplete bandaid that hampers responsible users.
Description: I can duplicate item in my own inventory using this plugin
How to reproduce: Put 1 stackable item (with an amount less than the max amount of stackable, for example, "30 iron ingot") in your inventory and make sure there is no other item in your inventory. Then run the command "/openinv" and do "Shift + right click" or "Shift + left click" to the item (you can click to the opened GUI or to the inventory GUI)
Server version: