Interface DynamicKeyServerRegistry


public interface DynamicKeyServerRegistry
Server-side API contract for mutating dynamic keybinds for specific players.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    registerForPlayer(net.minecraft.server.level.ServerPlayer player, String id, int keyCode, String category, Optional<DynamicKeybindAction> action, DisplaySpec displaySpec)
    Registers a dynamic keybind for a specific player and syncs it to that player.
    boolean
    unregisterForPlayer(net.minecraft.server.level.ServerPlayer player, String id)
    Removes a dynamic keybind for a specific player and syncs the updated list to that player.
  • Method Details

    • registerForPlayer

      boolean registerForPlayer(net.minecraft.server.level.ServerPlayer player, String id, int keyCode, String category, Optional<DynamicKeybindAction> action, DisplaySpec displaySpec)
      Registers a dynamic keybind for a specific player and syncs it to that player.
      Returns:
      true when the keybind was added, false otherwise
    • unregisterForPlayer

      boolean unregisterForPlayer(net.minecraft.server.level.ServerPlayer player, String id)
      Removes a dynamic keybind for a specific player and syncs the updated list to that player.
      Returns:
      true when a keybind was removed, false otherwise