Asleeepp / skript-itemsadder

GNU General Public License v3.0
7 stars 1 forks source link

cant drag and drop vanilla item out of inventory #7

Closed CirrusPreeminent closed 6 months ago

CirrusPreeminent commented 6 months ago

with this function on inventory click: if event-item is a ia item "guide_book": cancel event when i try to drop minecraft vanilla item by drag out of inventory it's disappear and not drop. even if i don't have ia item "guide_book" in my inv.

This should be a bug right?

Step to reproduce: 1.create a skript on inventory click function to check whether is event-item is an ia item or not 2.if it is an ia item : cancel event 2.not matter if the condition is true or not (you have that ia item in your inv or not) 3.try to drop any minecraft vanilla item like wool, by click and drag out of inventory in [e] inventory menu. 4.the item will disappear and not drop

FYI: this behaviour also affect shopkeeper plugin. That i will not able to place any minecraft vanilla item to the shop PS: if you remove cancel event from the condition you can normally drop the item

After more of testing i'm sure this is a bug. when player try to drop vanilla item by drag out of inventory in inventory menu, the condition of ia item will set to true eventually. so the event got cancel. But don't know why the item also disappeared.

Asleeepp commented 6 months ago

Can you try adding a namespace to the if event-item is ia item? I've just tested, and its working fine for me. like "namespace:id"

CirrusPreeminent commented 6 months ago

Sorry, but I do not understand the word. What do you mean by adding a namespace? I'm also glad to hear that everything is working fine for you. But here is the video of what I am having a problem with.

https://github.com/Asleeepp/skript-itemsadder/assets/153276550/180ea617-30be-4255-937f-62d842f547b8

you can see that for me the drop dirt event got cancel and in the game-chat it send me the message that the condition was true

on inventory click: send "just check item: %event-item%" if event-item is a ia item "guide_book": cancel event send "condition is true: %event-item%"

also i have try without any ia item in inv but the problem still persist

image

image

Asleeepp commented 6 months ago

Okay, so when you do /iagive [name] guide_book, what is the namespace that is provided? it should be something like "namespace:guide_book", you need to input the namespace and id together, so instead of "guide_book" its "namespace:guide_book", exactly how its written in /iagive.

CirrusPreeminent commented 6 months ago

This? image Still not working

BUT the problem is not that the condition is not met. I mean the skript work fine detecting if the event-item is guide_book. So, now with the current skript i can move other minecraft item freely in inventory except the guide_book because that what my script does (cancel event)

The problem IS THAT if i try to drag and drop minecraft item out of inventory it will also get cancel event. AS you can see from my last 10 second in the video.

Asleeepp commented 6 months ago

Because you are clicking, it cancels the event, but it seems to be somewhat inconsistent.

CirrusPreeminent commented 6 months ago

Guess I now will use normal skript to check event-item and check its lore matching afterward cause it's working.

image

Thanks for your help anyway. The suggestion feature might be to make check event-item ia work the same behaviour that normal check event-item can do.