From a5839ae1c82d15d0bdb5f7935d3d7631481f63b5 Mon Sep 17 00:00:00 2001 From: themode Date: Mon, 16 Nov 2020 12:25:13 +0100 Subject: [PATCH] PacketListenerManager#processServerPacket comment --- .../server/listener/manager/PacketListenerManager.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/net/minestom/server/listener/manager/PacketListenerManager.java b/src/main/java/net/minestom/server/listener/manager/PacketListenerManager.java index 40fe44110..f153afd0c 100644 --- a/src/main/java/net/minestom/server/listener/manager/PacketListenerManager.java +++ b/src/main/java/net/minestom/server/listener/manager/PacketListenerManager.java @@ -84,6 +84,14 @@ public final class PacketListenerManager { packetListenerConsumer.accept(packet, player); } + /** + * Executes the consumers from {@link ConnectionManager#onPacketSend(PacketConsumer)}. + * + * @param packet the packet to process + * @param player the player which should receive the packet + * @param the packet type + * @return true if the packet is not cancelled, false otherwise + */ public boolean processServerPacket(@NotNull T packet, @NotNull Player player) { final PacketController packetController = new PacketController(); for (PacketConsumer packetConsumer : CONNECTION_MANAGER.getSendPacketConsumers()) {