接口 ServerEvents.Connection.Send.Allow

封闭类:
ServerEvents.Connection.Send
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public static interface ServerEvents.Connection.Send.Allow
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    allowSend(@Nullable net.minecraft.network.PacketListener packetListener, @NotNull net.minecraft.network.protocol.Packet<?> packet)
    Called when a packet is sent by the server.
  • 方法详细资料

    • allowSend

      boolean allowSend(@Nullable @Nullable net.minecraft.network.PacketListener packetListener, @NotNull @NotNull net.minecraft.network.protocol.Packet<?> packet)
      Called when a packet is sent by the server.
      参数:
      packetListener - the packet listener may be null
      packet - the packet being sent
      返回:
      true if the packet should be sent, otherwise false