> For the complete documentation index, see [llms.txt](https://hcore.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hcore.gitbook.io/wiki/others/world-borders.md).

# World Borders

hCore allows you to easily add world borders for player.

## Example

This will create world border for provided player with blue color.

```java
HWorldBorder myBorder = HCore.createBorder(player.getLocation(), 20, 0, 0, 0, 0, HBorderColor.BLUE); // creates a blue worldborder at player's location
myBorder.show(player); //shows world border for player
System.out.println(myBorder.getCenter()); // prints the center location of border
```

## HWorldBorder#setCenter(Location)

Sets center location of border.

## HWorldBorder#setColor(HBorderColor)

Sets border's color to provided.

## HWorldBorder#setWarningDistance(int)

Sets warning distance of worldBorder.

## HWorldBorder#setWarningTime(int)

How much time border will warn player about damage.

## HWorldBorder#setDamageAmout(double)

Sets border's damage amout.

## HWorldBorder#setDamageBuffer(double)

Sets border's damage buffer.

## HWorldBorder#showAll()

Shows world border to all players
