public final class ProtocolImpl extends Protocol
| Modifier and Type | Class and Description |
|---|---|
class |
ProtocolImpl.ClientChannelHook |
class |
ProtocolImpl.ServerChannelHook |
Protocol.PacketInListener, Protocol.PacketOutListener| Constructor and Description |
|---|
ProtocolImpl() |
| Modifier and Type | Method and Description |
|---|---|
io.netty.channel.Channel |
getChannel(org.bukkit.entity.Player plr)
Returns the channel of a Player
|
org.bukkit.entity.Player |
getPlayer(java.lang.Object channel)
Returns the Player belonging to the given channel
|
void |
init()
Initializes the PacketAPI
|
void |
injectPlayer(org.bukkit.entity.Player plr) |
void |
onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent e) |
void |
onPlayerLogin(org.bukkit.event.player.PlayerLoginEvent e) |
void |
onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent e) |
void |
printPipeline(java.lang.Iterable<java.util.Map.Entry<java.lang.String,?>> pipeline) |
void |
receivePacket(java.lang.Object channel,
java.lang.Object packet)
Simulates receiving the given vanilla packet from a channel
|
void |
registerServerChannelHook() |
void |
removeHandler(java.lang.Object ch,
java.lang.String handler) |
void |
sendPacket(java.lang.Object channel,
java.lang.Object packet)
Sends the given vanilla packet to a channel
|
void |
unregisterServerChannelHandler() |
close, dispatchPacketInEvent, dispatchPacketOutEvent, receivePacket, registerIncomingListener, registerOutgoingListener, sendPacket, uninjectChannel, uninjectPlayer, unregisterIncomingListener, unregisterIncomingListener, unregisterOutgoingListener, unregisterOutgoingListenerpublic io.netty.channel.Channel getChannel(org.bukkit.entity.Player plr)
ProtocolgetChannel in class Protocolplr - - The target Playerpublic org.bukkit.entity.Player getPlayer(java.lang.Object channel)
Protocolpublic void init()
throws java.lang.Throwable
Protocolpublic void injectPlayer(org.bukkit.entity.Player plr)
injectPlayer in class Protocolpublic void printPipeline(java.lang.Iterable<java.util.Map.Entry<java.lang.String,?>> pipeline)
printPipeline in class Protocolpublic void receivePacket(java.lang.Object channel,
java.lang.Object packet)
ProtocolreceivePacket in class Protocolchannel - - The sender players channelpacket - - The sendable packetpublic void registerServerChannelHook()
throws java.lang.Throwable
registerServerChannelHook in class Protocoljava.lang.Throwablepublic void removeHandler(java.lang.Object ch,
java.lang.String handler)
removeHandler in class Protocolpublic void sendPacket(java.lang.Object channel,
java.lang.Object packet)
ProtocolsendPacket in class Protocolchannel - - The target players channelpacket - - The sendable packetpublic void unregisterServerChannelHandler()
throws java.lang.IllegalAccessException
unregisterServerChannelHandler in class Protocoljava.lang.IllegalAccessExceptionpublic void onPlayerJoin(org.bukkit.event.player.PlayerJoinEvent e)
public void onPlayerLogin(org.bukkit.event.player.PlayerLoginEvent e)
public void onPlayerQuit(org.bukkit.event.player.PlayerQuitEvent e)