Interface DynamicKeyServerRegistry
public interface DynamicKeyServerRegistry
Server-side API contract for mutating dynamic keybinds for specific players.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanregisterForPlayer(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.booleanunregisterForPlayer(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
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
-