Skip to content

Instantly share code, notes, and snippets.

@NiclasOlofsson
Created March 9, 2015 23:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NiclasOlofsson/d76642ab0a58f8a54d12 to your computer and use it in GitHub Desktop.
Save NiclasOlofsson/d76642ab0a58f8a54d12 to your computer and use it in GitHub Desktop.
[Plugin]
public class PlayerLoginPlugin
{
private static readonly ILog Log = LogManager.GetLogger(typeof (PlayerLoginPlugin));
[PacketHandler]
public Package OnLogin(McpeLogin packet, Player newPlayer)
{
Log.InfoFormat("Player {0} connected from {1}", newPlayer.Username, newPlayer.EndPoint.Address);
return packet;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment