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
Modifier and TypeFieldDescriptionfinal EnumKeyPacketMode
The function of the key pressedfinal net.minecraft.server.level.ServerPlayer
The player who pressed the key -
Constructor Summary
ConstructorDescriptionKeyEvent
(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
-
Field Details
-
player
public final net.minecraft.server.level.ServerPlayer playerThe player who pressed the key -
key
The function of the key pressed
-
-
Constructor Details
-
KeyEvent
-