001 package org.bukkit.entity;
002
003 /**
004 * Represents a boat entity.
005 */
006 public interface Boat extends Vehicle {
007
008 /**
009 * Gets the maximum speed of a boat. The speed is unrelated to the
010 * velocity.
011 *
012 * @return The max speed.
013 */
014 public double getMaxSpeed();
015
016 /**
017 * Sets the maximum speed of a boat. Must be nonnegative. Default is 0.4D.
018 *
019 * @param speed The max speed.
020 */
021 public void setMaxSpeed(double speed);
022
023 /**
024 * Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied
025 * boats. The default is 0.2.
026 *
027 * @return The rate of deceleration
028 */
029 public double getOccupiedDeceleration();
030
031 /**
032 * Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied
033 * boats. Setting this to a higher value allows for quicker acceleration.
034 * The default is 0.2.
035 *
036 * @param rate deceleration rate
037 */
038 public void setOccupiedDeceleration(double rate);
039
040 /**
041 * Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied
042 * boats. The default is -1. Values below 0 indicate that no additional
043 * deceleration is imposed.
044 *
045 * @return The rate of deceleration
046 */
047 public double getUnoccupiedDeceleration();
048
049 /**
050 * Sets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied
051 * boats. Setting this to a higher value allows for quicker deceleration
052 * of boats when a player disembarks. The default is -1. Values below 0
053 * indicate that no additional deceleration is imposed.
054 *
055 * @param rate deceleration rate
056 */
057 public void setUnoccupiedDeceleration(double rate);
058
059 /**
060 * Get whether boats can work on land.
061 *
062 * @return whether boats can work on land
063 */
064 public boolean getWorkOnLand();
065
066 /**
067 * Set whether boats can work on land.
068 *
069 * @param workOnLand whether boats can work on land
070 */
071 public void setWorkOnLand(boolean workOnLand);
072 }