Fast entity kicking passengers

All the code I used is in the video.
https://youtu.be/8REpSlR53wg

Simple description: I have a custom entity and I am applying a model to it. It is a vehicle plugin I am coding. When the entity is fast enough, the driver or one of the passengers (or all the passengers, need more tests) is kicked from the vehicle and the

    public List<org.bukkit.entity.Entity> getMegPassengers() {
        List<org.bukkit.entity.Entity> passengers = new ArrayList<>();
        MountManager manager = megEntity.getMountManager();
        if (manager.getDriver() != null)
            passengers.add(manager.getDriver());

        for (Mountable mountable : manager.getPassengers().values())
            passengers.addAll(mountable.getRiders());

        return passengers;
    }

still returns the passengers even if they were kicked. After that, an exception is thrown if the player who was kicked gets close to the model range.

/version: Paper version git-Paper-388 (MC: 1.18.2) (Implementing API version 1.18.2-R0.1-SNAPSHOT) (Git: fc9ee65 on ver/1.18.2)
ModelEngine version: Demo vR3.1.3

Edited Feb 26, 2023 by WizardlyBump17
Assignee Loading
Time tracking Loading