Class KeyEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
com.pixelmonmod.pixelmon.api.events.KeyEvent

public class KeyEvent extends net.minecraftforge.eventbus.api.Event
Event fired when the server is notified of one of Pixelmon's registered keys being pressed. Canceling this event will prevent any action based on this key press. Primarily for diagnostics.
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The function of the key pressed
    final net.minecraft.server.level.ServerPlayer
    The player who pressed the key
  • Constructor Summary

    Constructors
    Constructor
    Description
    KeyEvent(net.minecraft.server.level.ServerPlayer player, EnumKeyPacketMode key)
     
  • Method Summary

    Methods inherited from class net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • player

      public final net.minecraft.server.level.ServerPlayer player
      The player who pressed the key
    • key

      public final EnumKeyPacketMode key
      The function of the key pressed
  • Constructor Details

    • KeyEvent

      public KeyEvent(net.minecraft.server.level.ServerPlayer player, EnumKeyPacketMode key)