# World Borders

## 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hcore.gitbook.io/wiki/others/world-borders.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
