11package lol .bai .badpackets .api ;
22
3+ import io .netty .channel .ChannelFutureListener ;
34import lol .bai .badpackets .api .play .ClientPlayContext ;
45import lol .bai .badpackets .api .play .PlayPackets ;
56import lol .bai .badpackets .api .play .ServerPlayContext ;
89import lol .bai .badpackets .impl .marker .ApiSide ;
910import lol .bai .badpackets .impl .payload .UntypedPayload ;
1011import net .minecraft .network .FriendlyByteBuf ;
11- import net .minecraft .network .PacketSendListener ;
1212import net .minecraft .network .codec .StreamCodec ;
1313import net .minecraft .network .protocol .common .custom .CustomPacketPayload ;
1414import net .minecraft .resources .ResourceLocation ;
@@ -78,7 +78,7 @@ default void send(CustomPacketPayload payload) {
7878 *
7979 * @param callback a callback in which will be called after the packet sent to the target.
8080 */
81- void send (CustomPacketPayload payload , @ Nullable PacketSendListener callback );
81+ void send (CustomPacketPayload payload , @ Nullable ChannelFutureListener callback );
8282
8383 /**
8484 * Send a packet to the target.
@@ -92,7 +92,7 @@ default void send(ResourceLocation id, FriendlyByteBuf buf) {
9292 *
9393 * @param callback a callback in which will be called after the packet sent to the target.
9494 */
95- default void send (ResourceLocation id , FriendlyByteBuf buf , @ Nullable PacketSendListener callback ) {
95+ default void send (ResourceLocation id , FriendlyByteBuf buf , @ Nullable ChannelFutureListener callback ) {
9696 send (new UntypedPayload (UntypedPayload .type (id ), buf ), callback );
9797 }
9898
0 commit comments