Code:
on rightclick holding yellow dye:
player's tool is not yellow dye named "asd" with lore "123":
stop
remove 1 of event-item from player's inventory
send "&f3" to player
wait 5 ticks
send "&e2" to player
wait 5 ticks
send "&61" to player
wait 5 ticks
add "a" to {_rew::*}
add "b" to {_rew::*}
add "c" to {_rew::*}
set {_rew} to random element of {_rew::*}
make console execute command "/kit %{_rew}% %player%"
send "ok" to player
I made this imitating an old script (made with skript for minecraft 1.5.2), and it works fine with the latest skrip version on spigot 1.16.4, but I find 2 problems:
1. The item in the player's hand is removed but if it is greater than 2 or is a stack, the script does nothing.
2. the script crashes the server, but it is random times, I would say that when using the yellow dye about 10 times
-I have tried to look for information in other sites but in github I found that it was due to a skript bug itself, and the problem was marked as medium priority, but don't know if it has been solved so far, is it possible that I am doing something wrong, can anyone tell me which lines I should change?