Closed pixelfac closed 3 years ago
I haven't actually tested this. I don't know how. The PreventRiding component is added to the NPC configs in https://github.com/MineInAbyss/server-config/pull/14 so you need that code as well in order to test
You should add it in the init
block inside the NPC class, we can also add it to other mobs if we wish but it makes sense for all NPCs to have.
Oh sorry didnt see you made 2 PRs. I'll merge these in now, but just for future reference you can still make commits to your branch after a PR has been made, they'll just keep getting added.
Added PreventRiding component and VehicleEnterEvent function to cancel that vehicle enter event if the entity entering the vehicle has PreventRiding component.