On Inventory Item Move, Bug with the event.
arnigel2000 opened this issue ยท 8 comments
Skript/Server Version
[10:13:48 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[10:13:48 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[10:13:48 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[10:13:48 INFO]: [Skript] Server Version: git-Paper-550 (MC: 1.19.4)
[10:13:48 INFO]: [Skript] Skript Version: 2.8.0 (skriptlang-github)
[10:13:48 INFO]: [Skript] Installed Skript Addons:
[10:13:48 INFO]: [Skript] - skRayFall v1.9.28 (https://sk.rayfall.net/)
[10:13:48 INFO]: [Skript] - SkBee v3.4.1 (https://github.com/ShaneBeee/SkBee)
[10:13:48 INFO]: [Skript] - MTVehicles v2.5.4
[10:13:48 INFO]: [Skript] Installed dependencies:
[10:13:48 INFO]: [Skript] - Vault v1.7.3-b131
[10:13:48 INFO]: [Skript] - WorldGuard v7.0.8+33cdb4a
Bug Description
The problem is that the On Inventory Item Move event doesn't work. I tried in different versions: 2.8.7, 2.9.0 2.8.0. In the other 2 versions (2.8.7/2.9.0) the event is ignored, while in 2.8.0, trying to use it in any way gives an error, even trying to use the example in the sk documentation. I will try other versions and events again to see if I can work around the problem, but this is a bug.
Expected Behavior
the behavior I expect is that with this event I can have an "event-item" output and the inventories that are involved in the exchange.
Steps to Reproduce
make a .sk file and write this code inside:
on inventory item move:
broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"
message "works" to player
then reload the file and see that it doesn't work
Errors or Screenshots
[10:10:55 INFO]: Line 178: (gps.sk)
[10:10:55 INFO]: There's no inventory in an on inventory item move event
[10:10:55 INFO]: Line: broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"
[10:10:55 INFO]:
[10:10:55 INFO]: Line 179: (gps.sk)
[10:10:55 INFO]: There's no command sender in an on inventory item move event
[10:10:55 INFO]: Line: message "works"
[10:10:55 INFO]:
[10:10:55 INFO]: [Skript] Encountered 2 errors while reloading gps.sk! (90ms)
Other
No response
Agreement
- I have read the guidelines above and affirm I am following them with this report.
Oopsy.. There is a mistake in the documentation for past event-inventory
, can you try with just event-inventory
and future event-inventory
?
For the message
part, you need to define a player to send to (i.e. message "test" to all players
)
i tried tre different tipes of event-inventory, and also the message:
on inventory item move:
broadcast "%event-inventory% is transporting %event-item% to %future-event-inventory%!"
message "works" to player
on inventory item move:
broadcast "%holder of event-inventory% is transporting %event-item% to %holder of future event-inventory%!"
message "works" to event-player
on inventory item move:
broadcast "%holder of past event-inventory% is transporting %event-item% to %holder of event-inventory%!"
message "works" to event-player
all 3 give me the same error:
[11:38:09 INFO]: Line 178: (gps.sk)
[11:38:09 INFO]: There's no inventory in an on inventory item move event
[11:38:09 INFO]: Line: broadcast "%event-inventory% is transporting %event-item% to %future-event-inventory%!"
[11:38:09 INFO]:
[11:38:09 INFO]: Line 179: (gps.sk)
[11:38:09 INFO]: There's no command sender in an on inventory item move event
[11:38:09 INFO]: Line: message "works" to event-player
[11:38:09 INFO]:
[11:39:30 INFO]: Line 178: (gps.sk)
[11:39:30 INFO]: There's no inventory in an on inventory item move event
[11:39:30 INFO]: Line: broadcast "%holder of event-inventory% is transporting %event-item% to %holder of future event-inventory%!"
[11:39:30 INFO]:
[11:39:30 INFO]: Line 179: (gps.sk)
[11:39:30 INFO]: There's no command sender in an on inventory item move event
[11:39:30 INFO]: Line: message "works" to event-player
This event is added in 2.8.0, but event values were only added in 2.8.3 due to a whoopsie. Event values are event-inventory
which refers to the inventory before moving, and future event-inventory
refers to the new inventory. About event-player
, it does not exist.
Have you tried with 2.8.7 or 2.9?
I've tried both, but neither works. I tried now with 2.9.0 taken from spigot, and the event is simply not called, the simple broadcast and send message commands are not executed even if I move objects from one inv to another (without any error message). From the screenshot, your version 2.9.0 seems to have "(selfbuilt-unknown)" written next to the version, perhaps if I had the same resource as you I could solve the problem.
on inventory item move:
broadcast "afejufaiennmf"
send "works" to player
Have you tried with 2.8.7 or 2.9?
I've tried both, but neither works. I tried now with 2.9.0 taken from spigot, and the event is simply not called, the simple broadcast and send message commands are not executed even if I move objects from one inv to another (without any error message). From the screenshot, your version 2.9.0 seems to have "(selfbuilt-unknown)" written next to the version, perhaps if I had the same resource as you I could solve the problem.
on inventory item move: broadcast "afejufaiennmf" send "works" to player
The self-built is unrelated. Again, there's no player in an inventory move event. It's only for things like hoppers moving items between inventories. It's likely that you are expecting ti to work when players move items around, which is not the case.