org.bukkit.entity
Interface Boat

All Superinterfaces:
Entity, Metadatable, Vehicle

public interface Boat
extends Vehicle

Represents a boat entity.


Method Summary
 double getMaxSpeed()
          Gets the maximum speed of a boat.
 double getOccupiedDeceleration()
          Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied boats.
 double getUnoccupiedDeceleration()
          Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied boats.
 boolean getWorkOnLand()
          Get whether boats can work on land.
 void setMaxSpeed(double speed)
          Sets the maximum speed of a boat.
 void setOccupiedDeceleration(double rate)
          Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied boats.
 void setUnoccupiedDeceleration(double rate)
          Sets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied boats.
 void setWorkOnLand(boolean workOnLand)
          Set whether boats can work on land.
 
Methods inherited from interface org.bukkit.entity.Vehicle
getVelocity, setVelocity
 
Methods inherited from interface org.bukkit.entity.Entity
eject, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getWorld, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, teleport, teleport, teleport, teleport
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 

Method Detail

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


Copyright © 2013. All Rights Reserved.