-
Notifications
You must be signed in to change notification settings - Fork 1
VehicleHandler
-
putPlayerInDriveable(String playerUUID, String vehicleUUID)
Explanation: Puts a given player in the driver seat of a vehicle
- playerUUID : UUID of player
- vehicleUUID : UUID of vehicle to put the player in
-
removePlayerFromDriveable(String playerName)
Explanation: Removes a given player from a vehicle
- playerName : Name of player
-
removeAllFromDriveable(String driveableUUID)
Explanation: Removes all players from a given driveable
- driveableUUID : UUID of driveable
-
seatFromDriveable(String driveableUUID)
Explanation: Returns the UUID of the drivers seat of a given driveable
- driveableUUID : UUID of driveable
-
driveableFromSeat(String seatUUID)
Explanation: Returns the UUID of the driveable from a given seat
- seatUUID : UUID of seat
-
setFuelInTank(String seatUUID, float fuelAmount)
Explanation: Sets the fuel amount of a driveable
- seatUUID : UUID of seat
- fuelAmount : Amount of fuel to put in the driveable
-
getFuelInTank(String seatUUID)
Explanation: Returns the current amount of fuel
- seatUUID : UUID of seat
-
getFuelTankSize(String seatUUID)
Explanation: Returns the maximum amount of fuel a tank can have
- seatUUID : UUID of seat
-
putItemsInDriveable(String seatUUID, int[][][] ids, InventorySection inventorySection, boolean replaceExistingItems)
Explanation: Puts given items in a one of the inventories of a given driveable
- seatUUID : UUID of seat
- ids : list of all items to put in the driveable (ID, NBT, amount)
- inventorySection : either cargo, ammo, shells or mines
- replaceExistingItems : whether or not to replace items that are already in the driveable !A coding example for this method can be found in the "Example code"-wiki!
-
isSeat(String entityUUID)
Explanation: Returns whether or not a given entity is a seat
- entityUUID : UUID of the entity
-
isDriveable(String entityUUID)
Explanation: Returns whether or not a given entity is a driveable
- entityUUID : UUID of the entity
-
getPassengers(String driveableUUID)
Explanation: Returns a list of UUIDs of all the drivers and passengers
- driveableUUID : UUID of driveable
-
killDriveable(String entityUUID)
Explanation: Kills a given driveable
- entityUUID : UUID of the entity
-
getRiddenEntity(String playerName)
Explanation: Returns the UUID of the entity a given player is currently riding
- playerName : name of player
-
setRotation(String entityUUID, float rotation)
Explanation: Rotates a driveable by given degrees
- entityUUID : UUID of the entity
- rotation : degree of rotation
-
getRotation(String entityUUID)
Explanation: Returns the rotation of a given driveable
- entityUUID : UUID of the entity
-
spawnDriveable(int itemID, String worldName, int sx, int sy, int sz, float rotation)
Explanation: Simplified version of the other spawnDriveable method. It spawns a driveable with the given item ID but doesn't automatically put ammo, fuel, etc. in it.
- itemID : ID of item
- worldName : name of the world where the driveable should spawn
- sx : x coordinate of where to spawn the driveable
- sy : y coordinate of where to spawn the driveable
- sz : z coordinate of where to spawn the driveable
- rotation : rotation of the spawned driveable
-
spawnDriveable(String worldName, int cx, int cy, int cz, String type, int sx, int sy, int sz, float rotation)
Explanation: It will check if there is a chest at the given coordinates. If there is it will take the first item in it that isn't null an try to spawn it (make sure the first item is a vehicle/plane)
- worldName : name of the world to spawn the driveable in
- cx : x coordinate of chest
- cy : y coordinate of chest
- cz : z coordinate of chest
- type : (either "vehicle" or "plane")
- sx : x coordinate of where to spawn the driveable
- sy : y coordinate of where to spawn the driveable
- sz : z coordinate of where to spawn the driveable
- rotation : rotation of the spawned driveable