I am making a mario kart like plugin and want to introduce gears which determine the players max speed. Vehicle#setMaxSpeed() is deprecated, so there's no way to do this through the API from my understanding. My next thought is to use Vectors in some way. Maybe have a runnable that runs every tick that checks where the boat was last vs where it is now to determine the speed, and if it's too fast, set the velocity to something slower? I'm not sure. Any ideas?
@Smeary_Subset Deprecated doesn't necessarily mean it doesn't work. You could always give it a try. If it doesn't work, I believe the only other solution is messing with the velocity as you mentioned.
I'd rather not do deprecated because, if it gets removed, it will break the plugin. I'll play around with the velocities.
Thing about stuff being deprecated: in Bukkit it can be years before it gets removed, if it ever does.