Package com.cryptomorin.xseries
Class XWorldBorder
java.lang.Object
com.cryptomorin.xseries.XWorldBorder
Send different World Border data to each player.
This class is merely for visual purposes and doesn't support player HP damaging features.
- Version:
- 2.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected XWorldBorder.BorderBoundsstatic final doublestatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract XWorldBordercopy()static XWorldBordercreate()static XWorldBorderfrom(org.bukkit.WorldBorder bukkitWb) static @Nullable XWorldBorderget(org.bukkit.entity.Player player) abstract org.bukkit.Locationabstract doublefinal doublegetDistanceToBorder(org.bukkit.Location location) static XWorldBordergetOrCreate(org.bukkit.entity.Player player) abstract doublegetSize()abstract doubleabstract intabstract Durationabstract booleanisWithinBorder(org.bukkit.Location location) static @Nullable XWorldBorderremove(org.bukkit.entity.Player player) setCenter(double x, double z) abstract XWorldBordersetCenter(org.bukkit.Location location) abstract XWorldBordersetDamageBuffer(double blocks) abstract voidsetFor(Collection<org.bukkit.entity.Player> players, boolean forceInit) setSize(double newSize) setSizeLerpTarget(double sizeLerpTarget) The old size in which the border shrinking starts from.abstract XWorldBordersetWarningDistance(int blocks) Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border.abstract XWorldBordersetWarningTime(Duration time) toString()update(org.bukkit.entity.Player... players) Updates may be instant without needing this method, but it's always recommended to call this method after you're done to ensure changes are sent to the players.protected voidupdateBorderBounds(org.bukkit.Location center)
-
Field Details
-
ABSOLUTE_MAX_SIZE
public static final int ABSOLUTE_MAX_SIZE- See Also:
-
MAX_SIZE
public static final double MAX_SIZE- See Also:
-
MAX_CENTER_COORDINATE
public static final double MAX_CENTER_COORDINATE- See Also:
-
borderBounds
-
-
Constructor Details
-
XWorldBorder
public XWorldBorder()
-
-
Method Details
-
getDamageBuffer
public abstract double getDamageBuffer() -
getSizeLerpTarget
public abstract double getSizeLerpTarget() -
getSize
public abstract double getSize() -
isWithinBorder
public abstract boolean isWithinBorder(org.bukkit.Location location) -
getWarningDistance
public abstract int getWarningDistance() -
getWarningTime
-
getCenter
public abstract org.bukkit.Location getCenter() -
setFor
-
getBorderBounds
-
copy
-
setDamageBuffer
-
setWarningTime
-
setWarningDistance
Sets the warning distance that causes the screen to be tinted red when the player is within the specified number of blocks from the border. -
setSize
-
setSize
-
setSizeLerpTarget
The old size in which the border shrinking starts from.- Parameters:
sizeLerpTarget- in blocks.- See Also:
-
setCenter
-
setCenter
-
update
Updates may be instant without needing this method, but it's always recommended to call this method after you're done to ensure changes are sent to the players.- Parameters:
players- The players to send the updates to. Note that only players that were previously set usingsetFor(Collection, boolean)must be present here, otherwise you only need to call the other method.
-
toString
-
getDistanceToBorder
public final double getDistanceToBorder(org.bukkit.Location location) -
updateBorderBounds
protected void updateBorderBounds(org.bukkit.Location center) -
create
-
getOrCreate
-
get
-
remove
-
from
-