Does Shift-Click Event of something like this exist ???

ItsukaHiro

New member
Jun 7, 2023
3
0
1
I now using some plugin that disable the ability to move item to most of upper inventory (except all kind of chest). But it's really annoying that instead of going to another available slot in lower inventory, it just return to original slot (mean it's just fully disable Shift-Click - a very convenient and normal thing we all do). So I think it's just setCancelled(true) an event, but I dont know exactly what's the event. I try to make a plugin with Logic:

If ( that event be cancelled ) {
  • search for another available slot;
  • place item in that slot;
}

Thanks you guys. Also sorry for my bad English.

Edit: I'm using Paper 1.19.4
 
Last edited:

ItsukaHiro

New member
Jun 7, 2023
3
0
1
Could you elaborate on what your issue is? Your idea of the code looks good to me.
Well. I'm now using Weapon Mechanics plugin, and they have an option named: Disable_Use_In_Crafting. When it's true, you will not able to move the item (in my case, the gun) to any upper inventory related to crafting (crafting table, anvil, grindstone,...) but still allow to move to chest inventory (normal, trap, ender, shulker). But it's will also disable the ability to shift-click to fast move item. Like you want to move the item to the first slot in your inventory, not the crafting table (for example, while opening the crafting table inventory), and you use shift-click, the item will flash on crafting table, and immediately comeback to original slot.

But the thing I want to know is: What event is it (the shift-click, or fast move item)? In the API ? Because (I think) the plugin just setCancelled(true) to that event. And I can try to code a plugin to deal with that problem only when I know which event it is.

You may ask why I not ask the dev, and the answer is... Somehow they never reply my question °-°
 
Last edited: