Too Many Attributes
» Entity actions » Prevent key press

Prevent key press

too-many-attributes:prevent_key_presspower type

While active, the holder's keybinds don't work: either every keybind, or the listed ones.

FieldTypeDefaultDescription
keysArray of keybind idsevery keybindThe keybinds to block.
scrollBooleantrue without keys, false with themAlso block changing the hotbar slot with the mouse wheel.
affect_forcedBooleanfalseAlso block keys held by force_key_pressed.
unpressBooleantrueLet go of every held key when the block starts, so keys held through it have to be pressed again.
  • Escape and the F3 debug keys aren't keybinds, so they always work. Blocking every keybind also blocks chat, the inventory and the hotbar keys.
  • Origins' power keys and other mods' keybinds are blocked too. The server also refuses Origins' power keys and drops blocked keys from action_on_key_sequence, so a modified client can't get around it.
  • The condition is checked on the player's own client and on the server.
  • From Overgrown's Apoli: the fields match.

Example: "Rooted". While the power is active, you can't move or jump.

json
{
  "type": "too-many-attributes:prevent_key_press",
  "keys": [
    "key.forward",
    "key.back",
    "key.left",
    "key.right",
    "key.jump"
  ]
}