protocolsupport.api.events.ConnectionOpenEvent Java Examples

The following examples show how to use protocolsupport.api.events.ConnectionOpenEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProtocolSupportPocketStuff.java    From ProtocolSupportPocketStuff with GNU Affero General Public License v3.0 5 votes vote down vote up
@EventHandler
public void onConnectionOpen(ConnectionOpenEvent e) {
	ConnectionImpl con = (ConnectionImpl) e.getConnection();
	//We can't check if it is a PE player yet because it is too early to figure out
	//The packet listener will detach automatically if the connection turns out to be non-pe.
	con.addPacketListener(new PEReceiver.PEReceiverListener(con));
}
 
Example #2
Source File: LogicHandler.java    From ProtocolSupportBungee with GNU Affero General Public License v3.0 5 votes vote down vote up
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
	super.channelActive(ctx);
	if (isClientConnection) {
		ProxyServer.getInstance().getPluginManager().callEvent(new ConnectionOpenEvent(connection));
	}
}
 
Example #3
Source File: LogicHandler.java    From ProtocolSupport with GNU Affero General Public License v3.0 4 votes vote down vote up
@Override
public void channelActive(ChannelHandlerContext ctx) throws Exception {
	super.channelActive(ctx);
	Bukkit.getPluginManager().callEvent(new ConnectionOpenEvent(connection));
}