Interface Boat

All Superinterfaces:
CommandSender, Entity, Metadatable, Permissible, ServerOperator, Vehicle

public interface Boat
extends Vehicle
Represents a boat entity.
  • Method Details

    • getMaxSpeed

      double getMaxSpeed()
      Gets the maximum speed of a boat. The speed is unrelated to the velocity.
      Returns:
      The max speed.
    • setMaxSpeed

      void setMaxSpeed​(double speed)
      Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D.
      Parameters:
      speed - The max speed.
    • getOccupiedDeceleration

      double getOccupiedDeceleration()
      Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied boats. The default is 0.2.
      Returns:
      The rate of deceleration
    • setOccupiedDeceleration

      void setOccupiedDeceleration​(double rate)
      Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied boats. Setting this to a higher value allows for quicker acceleration. The default is 0.2.
      Parameters:
      rate - deceleration rate
    • getUnoccupiedDeceleration

      double getUnoccupiedDeceleration()
      Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied boats. The default is -1. Values below 0 indicate that no additional deceleration is imposed.
      Returns:
      The rate of deceleration
    • setUnoccupiedDeceleration

      void setUnoccupiedDeceleration​(double rate)
      Sets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied boats. Setting this to a higher value allows for quicker deceleration of boats when a player disembarks. The default is -1. Values below 0 indicate that no additional deceleration is imposed.
      Parameters:
      rate - deceleration rate
    • getWorkOnLand

      boolean getWorkOnLand()
      Get whether boats can work on land.
      Returns:
      whether boats can work on land
    • setWorkOnLand

      void setWorkOnLand​(boolean workOnLand)
      Set whether boats can work on land.
      Parameters:
      workOnLand - whether boats can work on land