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.modularcarunderwatervehicles.occupant.snowmobileunderwatervehicles.occupant.tomahaunderwatervehicles.occupant.motorbike.sidecarunderwatervehicles.occupant.motorbikeunderwatervehicles.occupant.pedalbikeunderwatervehicles.occupant.pedaltrikeunderwatervehicles.occupant.magnetcraneunderwatervehicles.occupant.minicopterunderwatervehicles.occupant.scraptransportunderwatervehicles.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(trueorfalse) -- Determines whether vehicles of this type can be used underwater.RequireOccupantPermission(trueorfalse) -- 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 to1.0for vanilla drag,0.0for no drag. Set somewhere between0.25and0.5to maintain some balance.- Note: Setting this to non-
0does take a minor performance cost, which gets counted in the plugin's total hook time so that you can monitor it.
- Note: Setting this to non-
Developer Hooks
OnVehicleUnderwaterEnable
object OnVehicleUnderwaterEnable(BaseVehicle vehicle)
- Called when this plugin is about to make a vehicle underwater capable
- Returning
falsewill prevent the vehicle from becoming underwater capable - Returning
nullwill 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.
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.

