Class DrivableVehicle

All Implemented Interfaces:
IVehicle

public class DrivableVehicle extends SpawnedVehicle
A spawned vehicle that can be driven by a player.
  • Method Details

    • update

      public void update()
      Description copied from class: SpawnedVehicle
      Update the vehicle (check for collisions).
      Overrides:
      update in class SpawnedVehicle
    • despawnVehicle

      protected StorageVehicle despawnVehicle()
      Description copied from class: SpawnedVehicle
      Overrides:
      despawnVehicle in class SpawnedVehicle
      Returns:
      The StorageVehicle if despawned.
    • setLocked

      public boolean setLocked(boolean locked)
      Lock or unlock this vehicle.
      Parameters:
      locked - The new locked state.
      Returns:
      true if changed to the given value, false if cancelled/changed by the event.
    • setLocked

      public boolean setLocked(boolean locked, org.bukkit.entity.Player locker)
      Lock or unlock this vehicle.
      Parameters:
      locked - The new locked state.
      locker - The player who locked the vehicle.
      Returns:
      true if changed to the given value, false if cancelled/changed by the event.
    • getFromStrategy

      public <T extends MovementStrategy, R> R getFromStrategy(MovementType type, Function<T,R> applyFunction, @NotNull R defaultValue)
      Specified by:
      getFromStrategy in interface IVehicle
      Overrides:
      getFromStrategy in class SpawnedVehicle
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class SpawnedVehicle
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class SpawnedVehicle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class SpawnedVehicle
    • toString

      public String toString()
      Overrides:
      toString in class SpawnedVehicle
    • getMomentum

      public List<org.bukkit.util.Vector> getMomentum()
      The momentum of this vehicle
    • isLocked

      public boolean isLocked()
      The locked state
    • isConfigurator

      public boolean isConfigurator()
      If this vehicle is a configurator vehicle used by the Vehicle Configurator This for example disables some features in the Vehicle GUI
    • setConfigurator

      public void setConfigurator(boolean configurator)
      If this vehicle is a configurator vehicle used by the Vehicle Configurator This for example disables some features in the Vehicle GUI
    • getTrunk

      public org.bukkit.inventory.Inventory getTrunk()
      The trunk of this vehicle