mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-28 12:07:42 +01:00
PacketListenerManager#processServerPacket comment
This commit is contained in:
parent
798b5d4853
commit
a5839ae1c8
@ -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 <T> the packet type
|
||||
* @return true if the packet is not cancelled, false otherwise
|
||||
*/
|
||||
public <T extends ServerPacket> boolean processServerPacket(@NotNull T packet, @NotNull Player player) {
|
||||
final PacketController packetController = new PacketController();
|
||||
for (PacketConsumer<ServerPacket> packetConsumer : CONNECTION_MANAGER.getSendPacketConsumers()) {
|
||||
|
Loading…
Reference in New Issue
Block a user