Interface IClientCommonPacketListenerExtension
- All Superinterfaces:
ICommonPacketListener,PacketListener
- All Known Subinterfaces:
ClientCommonPacketListener,ClientConfigurationPacketListener,ClientGamePacketListener
- All Known Implementing Classes:
ClientCommonPacketListenerImpl,ClientConfigurationPacketListenerImpl,ClientPacketListener
Extension interface for
ClientCommonPacketListener-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddisconnect(Component reason) Triggers a disconnection with the given reason.default voidsend(CustomPacketPayload payload) Sends a payload to the target of this listener.Methods inherited from interface net.neoforged.neoforge.common.extensions.ICommonPacketListener
getConnection, getConnectionType, getMainThreadEventLoop, hasChannel, hasChannel, hasChannel, sendMethods inherited from interface net.minecraft.network.PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetails, flow, isAcceptingMessages, onDisconnect, onPacketError, protocol, shouldHandleMessage
-
Method Details
-
send
Sends a payload to the target of this listener.- Specified by:
sendin interfaceICommonPacketListener
-
disconnect
Triggers a disconnection with the given reason.- Specified by:
disconnectin interfaceICommonPacketListener- Parameters:
reason- The reason for the disconnection
-