> For the complete documentation index, see [llms.txt](https://sonic-rokas.gitbook.io/easybungee/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-rokas.gitbook.io/easybungee/for-developers/example-servers.md).

# Example - Servers

#### 1.1 Get all network's players

```
new BungeeServer().getPlayers();
```

#### 1.2 Get all network's servers

```
new BungeeServer().getServers();
```

#### 1.3 Send a message to a network's server

```
To Proxy:

new BungeeServer().sendToConsole(message);

To A Spigot Server

new SpigotServer(name).sendToConsole(message);
```

#### 1.4 Send a command to a network's server

```
new SpigotServer(name).executeCommand(command);
```

#### 1.5 Get the worlds of a network's server

```
new SpigotServer(name).getWorlds().send(worlds -> worlds.getWorlds());
```

#### 1.6 Create a world in a network's server

```
new SpigotServer(serverName).createWorld(new SpigotWorld(serverName,worldName)).send();
```

#### 1.7 Broadcast a message to a network's server

```
new SpigotServer(serverName).broadcast(message).send();
```
