Set Max Speed of Boat

Discussion in 'Plugin Development' started by Smeary_Subset, Jan 23, 2025.

  1. Offline

    Smeary_Subset

    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?
     
  2. Offline

    KarimAKL

    @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.
     
  3. Offline

    Smeary_Subset

    I'd rather not do deprecated because, if it gets removed, it will break the plugin. I'll play around with the velocities.
     
  4. Offline

    timtower Administrator Administrator Moderator

    Thing about stuff being deprecated: in Bukkit it can be years before it gets removed, if it ever does.
     

Share This Page