Interface IServerCommonPacketListenerExtension
- All Superinterfaces:
ICommonPacketListener,PacketListener
- All Known Subinterfaces:
IServerConfigurationPacketListenerExtension,IServerGamePacketListenerExtension,ServerCommonPacketListener,ServerConfigurationPacketListener,ServerGamePacketListener
- All Known Implementing Classes:
FakePlayer.FakePlayerNetHandler,ServerCommonPacketListenerImpl,ServerConfigurationPacketListenerImpl,ServerGamePacketListenerImpl
Extension interface for
ServerCommonPacketListener-
Method Summary
Modifier and TypeMethodDescriptiondefault voidsend(CustomPacketPayload payload) Sends a payload to the target of this listener.default voidsend(CustomPacketPayload payload, @Nullable io.netty.channel.ChannelFutureListener listener) Sends a payload to the client of this listener.voidSends a packet to the client of this listener.Methods inherited from interface net.neoforged.neoforge.common.extensions.ICommonPacketListener
disconnect, 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
-
send
Sends a packet to the client of this listener.- Parameters:
listener- An optional callback for when the payload is sent
-
send
default void send(CustomPacketPayload payload, @Nullable @Nullable io.netty.channel.ChannelFutureListener listener) Sends a payload to the client of this listener.- Parameters:
listener- An optional callback for when the payload is sent
-