WhiteThunder
Allows vehicles to function underwater

Supported Games
GameServerKingsGameServerKings

Features

  • Allows vehicles to be used underwater, optionally requiring permission
  • Supports modular cars, snowmobiles, magnet cranes, minicopters, scrap transport helicopters and attack helicopters
  • Allows adjusting underwater drag for ground vehicles

Permissions

Using the plugin's default configuration, permissions have no effect. However, if you configure a given vehicle type to require occupant permission, then vehicles of that type will only be usable underwater while one of the vehicle's occupants (mounted players) has the corresponding permission.

  • underwatervehicles.occupant.modularcar
  • underwatervehicles.occupant.snowmobile
  • underwatervehicles.occupant.tomaha
  • underwatervehicles.occupant.motorbike.sidecar
  • underwatervehicles.occupant.motorbike
  • underwatervehicles.occupant.pedalbike
  • underwatervehicles.occupant.pedaltrike
  • underwatervehicles.occupant.magnetcrane
  • underwatervehicles.occupant.minicopter
  • underwatervehicles.occupant.scraptransport
  • underwatervehicles.occupant.attackhelicopter

Configuration

Default configuration:

{
  "ModularCar": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "Snowmobile": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "Tomaha": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "MotorBikeSidecar": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "MotorBike": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "PedalBike": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "PedalTrike": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "MagnetCrane": {
    "Enabled": false,
    "RequireOccupantPermission": false,
    "DragMultiplier": 1.0
  },
  "Minicopter": {
    "Enabled": false,
    "RequireOccupantPermission": false
  },
  "ScrapTransportHelicopter": {
    "Enabled": false,
    "RequireOccupantPermission": false
  },
  "AttackHelicopter": {
    "Enabled": false,
    "RequireOccupantPermission": false
  }
}
  • Enabled (true or false) -- Determines whether vehicles of this type can be used underwater.
  • RequireOccupantPermission (true or false) -- Determines whether vehicles of this type require that the at least one occupant (mounted player) to have permission for the vehicle to be usable underwater.
  • DragMultiplier -- Determines how much drag ground vehicles receive for being in water. Set to 1.0 for vanilla drag, 0.0 for no drag. Set somewhere between 0.25 and 0.5 to maintain some balance.
    • Note: Setting this to non-0 does take a minor performance cost, which gets counted in the plugin's total hook time so that you can monitor it.

Developer Hooks

OnVehicleUnderwaterEnable

object OnVehicleUnderwaterEnable(BaseVehicle vehicle)
  • Called when this plugin is about to make a vehicle underwater capable
  • Returning false will prevent the vehicle from becoming underwater capable
  • Returning null will result in the default behavior
MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.