Interface PlayerKeyListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PlayerKeyListener
An interface for listening to key presses from a player
You can register this using the PlayerPartyStorage.registerKeyListener(PlayerKeyListener) method.
It is important to note that this only works when the player is in a GUI that has a PixelmonItems.ui_element in it
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onKeyPress(net.minecraft.server.level.ServerPlayer player, int keyCode, int scanCode, int modifiers)
    Called when a player presses a key
  • Method Details

    • onKeyPress

      void onKeyPress(net.minecraft.server.level.ServerPlayer player, int keyCode, int scanCode, int modifiers)
      Called when a player presses a key
      Parameters:
      player - The player that pressed the key
      keyCode - The key code of the key that was pressed
      scanCode - The scan code of the key that was pressed
      modifiers - The modifiers of the key that was pressed