> For the complete documentation index, see [llms.txt](https://walksy.gitbook.io/walksylib-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://walksy.gitbook.io/walksylib-docs/walksylibservermanager/developers/events.md).

# Events

WalksyLibControl fires two Bukkit events in `main.walksy.lib.control.api.event`.&#x20;

## `ClientModsReportedEvent`

Fired when a player's WalksyLib client reports which mods it has and what they allow.

```java
@EventHandler
public void onReport(ClientModsReportedEvent event) {
    Player player = event.getPlayer();
    ClientInfo client = event.getClient();

    if (client.hasMod("shieldstatus")) {
        //dosomethingcool
    }
}
```

Use it to react to what a player has installed, or to wait for the report before checking `PlayerControl.client()`.

## `PlayerRestrictionsChangeEvent`

Fired when what's switched off for a player changes, whatever the cause: a command, a world change, a permission, or the API. It only fires for players running WalksyLib, at the moment their client is sent the update.

```java
@EventHandler
public void onChange(PlayerRestrictionsChangeEvent event) {
    Set<Restriction> before = event.getPrevious();
    Set<Restriction> after = event.getCurrent();
}
```

Both sets are the player's full effective restrictions, the same as `PlayerControl.effective()`.
