Gamealition / Survival-Skripts

Scripts for the Gamealition Minecraft Survival server that are powered by Skript, including the DERPI punishment system
http://njol.ch/projects/skript/
MIT License
7 stars 2 forks source link

Vehicle destroy event not caught for minecarts #6

Closed RoyCurtis closed 8 years ago

RoyCurtis commented 8 years ago

The vehicle destroy event is not firing in Skript when a minecart is destroyed by a player, by any means (fist/sword)

Example code

on vehicle destroy:
    player has permission "gamealition.group.default" or "gamealition.group.newbie"

    # For newbie rank, only cancel if outside resource world
    if player has permission "gamealition.group.newbie":
        player's world is "resource" or "resource_nether" or "resource_the_end"
        exit trigger

    cancel the event
    execute console command "/approve-error %player% Can't destroy that!"
RoyCurtis commented 8 years ago

Fixed; vehicle destroy events use attacker not player