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

# world

{% hint style="info" %}
see also: [`entity`](/scripting/documentation/entity.md), [`tile entity`](/scripting/documentation/tile-entity.md), and [`network`](/scripting/documentation/network.md)
{% endhint %}

### clearTitleText

removes the currently displayed title overlay, including server-sent titles.

```java
world.clearTitleText();
```

***

### displayTitleText

displays the vanilla title overlay in the center of the screen.

```java
world.displayTitleText(String title, String subtitle, int fadeInTicks, int stayTicks, int fadeOutTicks);
```

***

### exists

returns `true` if the world is loaded.

```java
boolean exists = world.exists();
```

***

### getBlockAt

returns a [`Block`](/scripting/documentation/block.md) for the specified coordinates or vector.

```java
Block blockByPos = world.getBlockAt(Vec3 position);
Block blockByCoords = world.getBlockAt(int x, int y, int z);
```

***

### getDimension

returns the current dimension name.

```java
String dimension = world.getDimension();
```

### getEntities

returns every loaded entity.

```java
List<Entity> entities = world.getEntities();
```

***

### getEntityById

returns an [`Entity`](/scripting/documentation/entity.md) by id, or `null` when missing.

```java
Entity entity = world.getEntityById(int entityId);
```

***

### getMode

returns current gamemode as a string (ex. `NOT_HYPIXEL`, `BEDWARS_PREGAME`, `BEDWARS_GAME` ).

```java
String mode = world.getMode();
```

***

### getNetworkPlayers

returns the network player list.

```java
List<NetworkPlayer> players = world.getNetworkPlayers();
```

***

### getPlayerEntities

returns all loaded player entities.

```java
List<Entity> players = world.getPlayerEntities();
```

***

### getScoreboard

returns the sidebar scoreboard lines.

```java
List<String> scoreboard = world.getScoreboard();
```

***

### getSubtitleText

returns currently displayed subtitle text or an empty string if no subtitle is visible.

```java
String subtitle = world.getSubtitleText();
```

***

### getTabFooter

returns the tab list footer text.

```java
String footer = world.getTabFooter();
```

***

### getTabHeader

returns the tab list header text.

```java
String header = world.getTabHeader();
```

***

### getTeams

returns a map of team names to their members.

```java
Map<String, List<String>> teamMap = world.getTeams();
```

***

### getTileEntities

returns every loaded tile entity.

```java
List<TileEntity> tileEntities = world.getTileEntities();
```

***

### getTitleText

returns currently displayed title text or an empty string if no title is visible.

<pre class="language-java"><code class="lang-java"><strong>String title = world.getTitleText();
</strong></code></pre>

***

### isValidEntity

returns `true` if the provided entity is still loaded.

```java
boolean valid = world.isValidEntity(Entity entity);
```
