# IChatManager
> Interface for managing chat prefixes and broadcasting messages.
`gg.lode.bookshelfapi.api.manager.IChatManager`
---
## Signature
```java
public interface IChatManager
```
---
## Methods
| Method | Return Type | Description |
|--------|-------------|-------------|
| `setPrefix(String prefix)` | `void` | Sets the global chat prefix. |
| `getPrefix()` | `String` | Returns the current chat prefix. |
| `broadcast(String message)` | `void` | Broadcasts a message to all online players. |
| `broadcast(String message, String permission)` | `void` | Broadcasts a message to players with the specified permission. |
### Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| `prefix` | `String` | The prefix to prepend to messages. |
| `message` | `String` | The message to broadcast. |
| `permission` | `String` | Permission node required to receive the broadcast. |
---
## Usage
```java
IChatManager chat = BookshelfAPI.getApi().getChatManager();
chat.setPrefix("&7[&bMyPlugin&7] ");
chat.broadcast("Server restarting in 5 minutes!");
chat.broadcast("Staff alert: player reported", "myplugin.staff");
```
---
## Related Pages
- [[IBookshelfAPI]]