SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.03k stars 362 forks source link

Vehicle events doesn't work #5870

Closed Drapika closed 11 months ago

Drapika commented 11 months ago

Skript/Server Version

Server: paper 1.20.1 #100
Skript: Skript 2.7.0 beta 3

Bug Description

When I use any vehicle event

It does nothing, any error when I reload my skript or in console. I try to put a message for debugging like "send "test" to player" but nothing

Exept, "player's vehicle" is ok

Expected Behavior

Initially I make a skript to destroy player's vehicle on exit

Steps to Reproduce

on vehicle exit: send "test" to player destroy player's vehicle

Errors or Screenshots

No response

Other

No response

Agreement

AyhamAl-Ali commented 11 months ago

Try broadcast instead of send to player

Fusezion commented 11 months ago

destroy player's vehicle what is this from? As it isn't skript EDIT: had no issues of mine with entering a minecart using send

image image

on vehicle enter:
    # %event% is from reflect, just making a mention
    send "Event: %event%", "test", "player: %player%", "Vehicle: %vehicle of player%" to player
    kill player's vehicle

Only difference of mine is I'm running Paper 1.20.1-#98

Fusezion commented 11 months ago

Wanting to make a mention here too, not everything is labeled a vehicle there's only a handful. If you're riding something you normally can't ride without special commands you should be using the on dismount event which is called for the non vehicle entities like arrows and cows

Classes that are all extend the Vehicle class are as follow AbstractHorse, Boat, Camel, ChestBoat, ChestedHorse, CommandMinecart, Donkey, ExplosiveMinecart, HopperMinecart, Horse, Llama, Minecart, Mule, Pig, PoweredMinecart, RideableMinecart, SkeletonHorse, SpawnerMinecart, StorageMinecart, Strider, TraderLlama, ZombieHorse

Drapika commented 11 months ago

Thanks, I made a mistake, it's not "destroy" but "delete"

And, I try your code Fusezion and it works ! I try with a armor stand for vehicle and it does nothing, but with a boat it work

So I don't understand ._. For more explanation I try to make a /sit with a armor stand vehicle

AyhamAl-Ali commented 11 months ago

An armor stand is not a vehicle, you're using mount effect to mount player in the armor stand therefor the event will never trigger, for more help you can join the skUnity discord server to chat with other users about possible solutions.

Thanks to Fusezion for the clarification and help.

This issue in invalid towards what it was opened for.