# IInputManager
> Manages input effects for players running the Lectern client.
`gg.lode.lecternapi.api.manager.IInputManager`
---
## Signature
```java
public interface IInputManager
```
---
## Methods
### disableKeybind
```java
void disableKeybind(Player player, Keybind keybind)
```
Disables a keybind on the player's client.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `keybind` | `Keybind` | The keybind to disable. |
---
### enableKeybind
```java
void enableKeybind(Player player, Keybind keybind)
```
Re-enables a previously disabled keybind on the player's client.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `keybind` | `Keybind` | The keybind to re-enable. |
---
### clearDisabledKeybinds
```java
void clearDisabledKeybinds(Player player)
```
Clears all disabled keybinds, restoring normal input.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
---
### setKeybindsInverted
```java
void setKeybindsInverted(Player player, boolean inverted)
```
Inverts all keybinds on the player's client. W/S, A/D, sneak/jump, and attack/use are swapped.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `inverted` | `boolean` | `true` to invert, `false` to restore normal input. |
---
### setDisableHitbox
```java
void setDisableHitbox(Player player, boolean disabled)
```
Disables the player's ability to interact with entity hitboxes.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `disabled` | `boolean` | `true` to disable hitbox interaction. |
---
### setHeadLocked
```java
void setHeadLocked(Player player, boolean locked)
```
Locks or unlocks the player's head/camera movement. When locked, the player cannot rotate their camera regardless of mouse input.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `locked` | `boolean` | `true` to lock head movement, `false` to unlock. |
---
### setDisableChunkReload
```java
void setDisableChunkReload(Player player, boolean disabled)
```
Disables or enables chunk reload on the player's client. When disabled, the client will not reload chunks (F3+A).
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `disabled` | `boolean` | `true` to disable chunk reload, `false` to enable. |
---
### setDisableChunkBoundaries
```java
void setDisableChunkBoundaries(Player player, boolean disabled)
```
Disables or enables chunk boundary rendering on the player's client. When disabled, the client will not render chunk boundaries (F3+G).
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `disabled` | `boolean` | `true` to disable chunk boundaries, `false` to enable. |
---
### registerKeybind
```java
void registerKeybind(Player player, String id, String translationKey, int defaultKey, String category)
```
Registers a custom keybind on the player's client. The keybind appears in the player's controls settings and fires `KeybindPressedEvent` when pressed. If a keybind with the same ID already exists, it is replaced.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `id` | `String` | A unique identifier for this keybind (e.g. `"myplugin:ability"`). |
| `translationKey` | `String` | The display name shown in controls (e.g. `"Use Ability"`). |
| `defaultKey` | `int` | The default GLFW key code (e.g. `GLFW.GLFW_KEY_G` = 71). |
| `category` | `String` | The category name in controls (e.g. `"My Plugin"`). |
---
### unregisterKeybind
```java
void unregisterKeybind(Player player, String id)
```
Unregisters a custom keybind from the player's client.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
| `id` | `String` | The keybind identifier to remove. |
---
### clearKeybinds
```java
void clearKeybinds(Player player)
```
Clears all custom keybinds on the player's client.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The target player. |
---
### setNoClip
```java
void setNoClip(Player player, boolean enabled)
```
Lets a player move through blocks without leaving the game mode they are in.
Spectator is the only mode where vanilla turns collision off, and entering it costs the
hotbar, the hand and every interaction. This gives the same freedom of movement while the
player stays exactly who they were, for a replay's viewers, who need to get inside a
building to watch a fight and still hold the controls the replay hands them.
Flight comes with it: a player with collision off and their feet on nothing would fall
until the world ran out.
**The caller owns the server's half.** Collision is decided on the client, but the
server independently rejects a player who ends up inside a block and teleports them back ,
so this must be paired with `player.setNoPhysics(true)`, or the client will pass
through the wall and be pulled straight back out of it. Setting it back to false belongs with
turning this off.
A no-op fallback so a consumer built against this interface still links against an older
implementation; the real implementation overrides it.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | the target player |
| `enabled` | `boolean` | true to pass through blocks, false to collide again |
---
### setNoClipWhileFlying
```java
void setNoClipWhileFlying(Player player, boolean enabled)
```
The same, but only while the player is actually flying.
The player decides, tick by tick, by flying or not: in the air they pass through the
world, and the moment they drop out of flight they stand on it again. Usually what is wanted
, it keeps walking, landing and standing on things intact, and makes passing through a wall
something done on purpose rather than the only way to move.
Decided on the client from its own abilities rather than asked of the server, so the
changeover happens on the tick the key is pressed rather than a packet later. The server's
half should be conditioned the same way: allow the movement only while the player is flying.
A no-op fallback so a consumer built against this interface still links against an older
implementation; the real implementation overrides it.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | the target player |
| `enabled` | `boolean` | true to pass through blocks while flying, false to collide again |
---
### setDisableSpearUsage
```java
void setDisableSpearUsage(Player player, boolean disabled)
```
Disables or enables 1.21.11 spear usage (lunge + attack) on the player's
client. When disabled, any item in the `#minecraft:spears` tag cannot
be lunged or used until re-enabled. Tracked, so it survives a reconnect.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | the target player |
| `disabled` | `boolean` | true to block spear usage, false to restore it |
---
### setDisableEndBeam
```java
void setDisableEndBeam(Player player, boolean disabled)
```
Disables or enables the end-gateway light beam render on the player's
client. When disabled, end gateway blocks no longer render their vertical
beam. Tracked, so it survives a reconnect.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | the target player |
| `disabled` | `boolean` | true to hide the end-gateway beam, false to restore it |
---
## Keybind Enum
`gg.lode.lecternapi.api.data.Keybind`
| Value | Key |
|---|---|
| `ATTACK` | `"attack"` |
| `USE` | `"use"` |
| `FORWARD` | `"forward"` |
| `BACK` | `"back"` |
| `LEFT` | `"left"` |
| `RIGHT` | `"right"` |
| `JUMP` | `"jump"` |
| `SNEAK` | `"sneak"` |
| `INVENTORY` | `"inventory"` |
| `TOGGLE_PERSPECTIVE` | `"togglePerspective"` |
---
## Related Pages
- [[ILecternAPI]]. Access via `getInputManager()`