public final class Protocol extends Object
| Constructor and Description |
|---|
Protocol() |
| Modifier and Type | Method and Description |
|---|---|
static void |
broadcastPacket(Iterable<org.bukkit.entity.Player> players,
com.comphenix.protocol.events.PacketContainer packet)
Sends a packet to each of the given players
|
static void |
broadcastPacket(com.comphenix.protocol.events.PacketContainer packet)
Sends a packet to all players connected to the server.
|
static com.comphenix.protocol.ProtocolManager |
manager()
Gets the protocol manager.
|
static void |
sendPacket(org.bukkit.entity.Player player,
com.comphenix.protocol.events.PacketContainer packet)
Sends a packet to the given player.
|
static ProtocolSubscriptionBuilder |
subscribe(com.comphenix.protocol.events.ListenerPriority priority,
com.comphenix.protocol.PacketType... packets)
Makes a HandlerBuilder for the given packets
|
static ProtocolSubscriptionBuilder |
subscribe(com.comphenix.protocol.PacketType... packets)
Makes a HandlerBuilder for the given packets
|
@Nonnull public static ProtocolSubscriptionBuilder subscribe(@Nonnull com.comphenix.protocol.PacketType... packets)
packets - the packets to handleProtocolSubscriptionBuilder to construct the event handler@Nonnull public static ProtocolSubscriptionBuilder subscribe(@Nonnull com.comphenix.protocol.events.ListenerPriority priority, @Nonnull com.comphenix.protocol.PacketType... packets)
priority - the priority to listen atpackets - the packets to handleProtocolSubscriptionBuilder to construct the event handler@Nonnull public static com.comphenix.protocol.ProtocolManager manager()
public static void sendPacket(@Nonnull org.bukkit.entity.Player player, @Nonnull com.comphenix.protocol.events.PacketContainer packet)
player - the playerpacket - the packetpublic static void broadcastPacket(@Nonnull com.comphenix.protocol.events.PacketContainer packet)
packet - the packetCopyright © 2022. All rights reserved.