Tuke-Nuke / TuSKe

TuSKe is a Skript addons which brings some new cool things and some simple plugins hook.
18 stars 36 forks source link

Ghost items #70

Closed Matocolotoe closed 4 years ago

Matocolotoe commented 5 years ago

Usually, the code below works very fine.

open virtual chest inventory with size 5 named "Stats" to player
format gui slot 13 of player with book named "Achievements" to run:
    open virtual chest inventory with size 5 named "Achievements" to player
    ...

When dragging an item which is supposed to run an action with the 1-9 keys in your inventory, the inventory closes, and the next one opens successfully but items do not appear unless a click is done on them. I'm not even sure if they work after that.

I tried to use player.updateInventory() with skript-mirror. Now the code looks like below.

open virtual chest inventory with size 5 named "Stats" to player
format gui slot 13 of player with book named "Achievements" to run:
    open virtual chest inventory with size 5 named "Achievements" to player
    ...
    player.updateInventory()

The items appear, but they are ghost items. I can drag them in my inventory manually, and any action on them disappears, even though any future interaction with them makes them disappear.

Tested with the following Skript versions : dev25, dev36, dev37c with PaperSpigot 1.8.8 (and I bet this issue is also there in 1.9+)