Package org.bukkit.entity
Interface Boat
- All Superinterfaces:
CommandSender,Entity,Metadatable,Permissible,ServerOperator,Vehicle
public interface Boat extends Vehicle
Represents a boat entity.
-
Nested Class Summary
-
Method Summary
Modifier and Type Method Description doublegetMaxSpeed()Gets the maximum speed of a boat.doublegetOccupiedDeceleration()Gets the deceleration rate (newSpeed = curSpeed * rate) of occupied boats.doublegetUnoccupiedDeceleration()Gets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied boats.booleangetWorkOnLand()Get whether boats can work on land.voidsetMaxSpeed(double speed)Sets the maximum speed of a boat.voidsetOccupiedDeceleration(double rate)Sets the deceleration rate (newSpeed = curSpeed * rate) of occupied boats.voidsetUnoccupiedDeceleration(double rate)Sets the deceleration rate (newSpeed = curSpeed * rate) of unoccupied boats.voidsetWorkOnLand(boolean workOnLand)Set whether boats can work on land.Methods inherited from interface org.bukkit.entity.Entity
eject, getCustomName, getEntityId, getFallDistance, getFireTicks, getLastDamageCause, getLocation, getLocation, getMaxFireTicks, getNearbyEntities, getPassenger, getServer, getTicksLived, getType, getUniqueId, getVehicle, getWorld, isCustomNameVisible, isDead, isEmpty, isInsideVehicle, isOnGround, isValid, leaveVehicle, playEffect, remove, setCustomName, setCustomNameVisible, setFallDistance, setFireTicks, setLastDamageCause, setPassenger, setTicksLived, spigot, teleport, teleport, teleport, teleportMethods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadataMethods inherited from interface org.bukkit.permissions.Permissible
addAttachment, addAttachment, addAttachment, addAttachment, getEffectivePermissions, hasPermission, hasPermission, isPermissionSet, isPermissionSet, recalculatePermissions, removeAttachment
-
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
-