Class VehicleEdit

java.lang.Object
nl.mtvehicles.core.infrastructure.models.MTVSubCommand
nl.mtvehicles.core.commands.vehiclesubs.VehicleEdit

public class VehicleEdit extends MTVSubCommand
/vehicle edit - edit held vehicle's specifications (in a GUI).
  • Constructor Details

    • VehicleEdit

      public VehicleEdit()
  • Method Details

    • getEditCommands

      public static List<String> getEditCommands()
    • execute

      public boolean execute()
      Description copied from class: MTVSubCommand
      Code executed by a subcommand
      Specified by:
      execute in class MTVSubCommand
      Returns:
      True if successful
    • editLicensePlate

      public static boolean editLicensePlate(org.bukkit.entity.Player player, String licensePlate, String newLicensePlate)
      Edit vehicle's license plate
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Current license plate
      newLicensePlate - New license plate
      Returns:
      true if successful
    • editName

      public static boolean editName(org.bukkit.entity.Player player, String licensePlate, String newName)
      Edit vehicle's name
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      newName - New vehicle name
      Returns:
      true if successful
    • editFuel

      public static boolean editFuel(org.bukkit.entity.Player player, String licensePlate, String fuelStr)
      Edit vehicle's fuel amount
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      fuelStr - New fuel amount as string
      Returns:
      true if successful
    • editFuelUsage

      public static boolean editFuelUsage(org.bukkit.entity.Player player, String licensePlate, String fuelUsageStr)
      Edit vehicle's fuel usage
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      fuelUsageStr - New fuel usage as string
      Returns:
      true if successful
    • editTrunkRows

      public static boolean editTrunkRows(org.bukkit.entity.Player player, String licensePlate, String rowsStr)
      Edit vehicle trunk's number of rows
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      rowsStr - New number of rows as string
      Returns:
      true if successful
    • editAccelerationSpeed

      public static boolean editAccelerationSpeed(org.bukkit.entity.Player player, String licensePlate, String speedStr)
      Edit vehicle's acceleration speed
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      speedStr - New acceleration speed as string
      Returns:
      true if successful
    • editMaxSpeed

      public static boolean editMaxSpeed(org.bukkit.entity.Player player, String licensePlate, String speedStr)
      Edit vehicle's maximum speed
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      speedStr - New maximum speed as string
      Returns:
      true if successful
    • editBrakingSpeed

      public static boolean editBrakingSpeed(org.bukkit.entity.Player player, String licensePlate, String speedStr)
      Edit vehicle's braking speed
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      speedStr - New braking speed as string
      Returns:
      true if successful
    • editFrictionSpeed

      public static boolean editFrictionSpeed(org.bukkit.entity.Player player, String licensePlate, String speedStr)
      Edit vehicle's friction speed
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      speedStr - New friction speed as string
      Returns:
      true if successful
    • editMaxSpeedBackwards

      public static boolean editMaxSpeedBackwards(org.bukkit.entity.Player player, String licensePlate, String speedStr)
      Edit vehicle's maximum backwards speed
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      speedStr - New maximum backwards speed as string
      Returns:
      true if successful
    • editRotationSpeed

      public static boolean editRotationSpeed(org.bukkit.entity.Player player, String licensePlate, String speedStr)
      Edit vehicle's rotation speed
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      speedStr - New rotation speed as string
      Returns:
      true if successful
    • editGlowing

      public static boolean editGlowing(org.bukkit.entity.Player player, String licensePlate, String valueStr)
      Edit whether the vehicle is glowing
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      valueStr - "true" or "false" for glowing effect
      Returns:
      true if successful
    • editFuelEnabled

      public static boolean editFuelEnabled(org.bukkit.entity.Player player, String licensePlate, String valueStr)
      Edit whether fuel is enabled for the vehicle
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      valueStr - "true" or "false" for fuel enabled
      Returns:
      true if successful
    • editTrunkEnabled

      public static boolean editTrunkEnabled(org.bukkit.entity.Player player, String licensePlate, String valueStr)
      Edit whether trunk is enabled for the vehicle
      Parameters:
      player - Player who holds the vehicle
      licensePlate - Vehicle's license plate
      valueStr - "true" or "false" for trunk enabled
      Returns:
      true if successful
    • editMenu

      public static void editMenu(org.bukkit.entity.Player p, org.bukkit.inventory.ItemStack item)
      Open /vehicle edit GUI menu to a player
      Parameters:
      p - Player
      item - Vehicle item