internal static Packet MakeSetPermission(Player player) { Packet packet = new Packet(2); packet.data[0] = (byte)OutputCodes.SetPermission; packet.data[1] = player.GetOPPacketCode(); return(packet); }
internal static Packet MakeHandshake(World world, Player player) { Packet packet = new Packet(131); packet.data[0] = (byte)OutputCodes.Handshake; packet.data[1] = (byte)Config.ProtocolVersion; ASCIIEncoding.ASCII.GetBytes(world.config.GetString("ServerName").PadRight(64), 0, 64, packet.data, 2); ASCIIEncoding.ASCII.GetBytes(world.config.GetString("MOTD").PadRight(64), 0, 64, packet.data, 66); packet.data[130] = (byte)player.GetOPPacketCode(); return(packet); }
internal static Packet MakeHandshake( World world, Player player ) { Packet packet = new Packet( 131 ); packet.data[0] = (byte)OutputCodes.Handshake; packet.data[1] = (byte)Config.ProtocolVersion; ASCIIEncoding.ASCII.GetBytes( world.config.GetString( "ServerName" ).PadRight( 64 ), 0, 64, packet.data, 2 ); ASCIIEncoding.ASCII.GetBytes( world.config.GetString( "MOTD" ).PadRight( 64 ), 0, 64, packet.data, 66 ); packet.data[130] = (byte)player.GetOPPacketCode(); return packet; }
internal static Packet MakeSetPermission( Player player ) { Packet packet = new Packet( 2 ); packet.data[0] = (byte)OutputCodes.SetPermission; packet.data[1] = player.GetOPPacketCode(); return packet; }
internal static Packet MakeHandshake( Player player, string serverName, string MOTD ) { Packet packet = new Packet( 131 ); packet.data[0] = (byte)OutputCodes.Handshake; packet.data[1] = (byte)Config.ProtocolVersion; Encoding.ASCII.GetBytes( serverName.PadRight( 64 ), 0, 64, packet.data, 2 ); Encoding.ASCII.GetBytes( MOTD.PadRight( 64 ), 0, 64, packet.data, 66 ); packet.data[130] = (byte)player.GetOPPacketCode(); return packet; }