public interface WorldBorder
It can gradually grow or shrink to a radius over a period of time. A warning is displayed when a contracting world border will reach the player in a certain amount of time, or when the player is a certain number of blocks away.
In Minecraft, a warning is displayed in the form of a reddish tint.
| Modifier and Type | Interface and Description | 
|---|---|
| static interface  | WorldBorder.Builder | 
| Modifier and Type | Method and Description | 
|---|---|
| static WorldBorder.Builder | builder()Creates a new  WorldBorder.Builderinstance for makingWorldBorders. | 
| default void | copyPropertiesFrom(WorldBorder border)Copies the properties of the passed border onto this border. | 
| com.flowpowered.math.vector.Vector3d | getCenter()Gets the center of the world border. | 
| double | getDamageAmount()Gets the damage done to a player per block per tick when outside the
 buffer. | 
| double | getDamageThreshold()Gets the distance a player may be outside the world border before taking
 damage. | 
| double | getDiameter()Gets the diameter of the world border. | 
| double | getNewDiameter()Gets the diameter the world border is expanding or contracting to. | 
| long | getTimeRemaining()Gets the time remaining until the world border stops expanding or
 contracting. | 
| int | getWarningDistance()Gets the distance when a contracting world border will warn a player for
 whom the world border is  distanceblocks away. | 
| int | getWarningTime()Gets the time when a contracting world border will warn a player for whom
 the world border will reach in  timeseconds. | 
| ChunkPreGenerate.Builder | newChunkPreGenerate(World world)Returns a new builder for creating a task to pre-generate the chunks
 inside the border. | 
| void | setCenter(double x,
         double z)Sets the center of the world border. | 
| void | setDamageAmount(double damage)Sets the damage done to a player per block per tick when outside the
 buffer. | 
| void | setDamageThreshold(double distance)Sets the distance a player may be be outside the world border before
 taking damage. | 
| void | setDiameter(double diameter)Sets the diameter of the world border. | 
| void | setDiameter(double startDiameter,
           double endDiameter,
           long time)Sets the starting diameter and the ending diameter of the world border,
 over the given period of time. | 
| void | setDiameter(double diameter,
           long time)Sets the diameter of the world border, over the given period of time. | 
| void | setWarningDistance(int distance)Sets the distance when a contracting world border will warn a player for
 whom the world border is  distanceblocks away. | 
| void | setWarningTime(int time)Sets the time when a contracting world border will warn a player for whom
 the world border will reach in  timeseconds. | 
static WorldBorder.Builder builder()
WorldBorder.Builder instance for making WorldBorders.double getNewDiameter()
This will return the same value as getDiameter() unless
 getTimeRemaining() is greater than 0.
double getDiameter()
The returned diameter applies to the x and z axis. The world border extends over the entire y-axis.
void setDiameter(double diameter)
The specified diameter applies to the x and z axis. The world border extends over the entire y-axis.
diameter - The diametervoid setDiameter(double diameter,
                 long time)
The world border diameter increases/decrease linearly over the specified time. The specified diameter applies to the x and z axis. The world border extends over the entire y-axis.
diameter - The diameter where the border will expand/contract totime - The time over which to change, in millisecondsvoid setDiameter(double startDiameter,
                 double endDiameter,
                 long time)
The world border diameter increases/diameter linearly over the specified time. The specified diameter applies to the x and z axis. The world border extends over the entire y-axis.
startDiameter - The diameter where the border will startendDiameter - The diameter where the border will endtime - The time over which to change, in millisecondslong getTimeRemaining()
void setCenter(double x,
               double z)
x - The x-axis center of the world borderz - The z-axis center of the world bordercom.flowpowered.math.vector.Vector3d getCenter()
The returned position is three-dimensional. As the world border
 extends over the entire y-axis, the returned position will always have a
 y set to 0.
int getWarningTime()
time seconds.
 In Minecraft, the warning is displayed in the form of a reddish tint.
void setWarningTime(int time)
time seconds.
 In Minecraft, the warning is displayed in the form of a reddish tint.
time - The time, in secondsint getWarningDistance()
distance blocks away.
 In Minecraft, the warning is displayed in the form of a reddish tint.
void setWarningDistance(int distance)
distance blocks away.
 In Minecraft, the warning is displayed in the form of a reddish tint.
distance - The distance, in blocksdouble getDamageThreshold()
void setDamageThreshold(double distance)
distance - The distancedouble getDamageAmount()
void setDamageAmount(double damage)
damage - The damage amountChunkPreGenerate.Builder newChunkPreGenerate(World world)
world - The target worldChunkPreGeneratedefault void copyPropertiesFrom(WorldBorder border)
border - The border whose properties are to be copied