Class UpdateKeybindPacket
java.lang.Object
dev.munebase.dynamickeybinds.network.UpdateKeybindPacket
Network packet sent from client to server to request updating a keybind's key code.
Allows clients to rebind an existing keybind to a different key without removing
it. This is used when players customize their keybind settings. The update is
persisted on the server and synchronized to all clients.
Direction: Client -> Server
Handler: ForgeServerKeybindHandler or FabricServerKeybindHandler
-
Constructor Summary
ConstructorsConstructorDescriptionUpdateKeybindPacket(String id, int keyCode) Construct a new UpdateKeybindPacket. -
Method Summary
Modifier and TypeMethodDescriptiongetId()Get the keybind ID to update.intGet the new key code.
-
Constructor Details
-
UpdateKeybindPacket
Construct a new UpdateKeybindPacket.- Parameters:
id- the keybind ID to updatekeyCode- the new GLFW key code
-
-
Method Details
-
getId
Get the keybind ID to update.- Returns:
- the keybind identifier
-
getKeyCode
public int getKeyCode()Get the new key code.- Returns:
- the new GLFW key code
-