Exemple #1
0
        internal static Packet MakeSetPermission(Player player)
        {
            Packet packet = new Packet(2);

            packet.data[0] = (byte)OutputCodes.SetPermission;
            packet.data[1] = player.GetOPPacketCode();
            return(packet);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 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;
 }
Exemple #4
0
 internal static Packet MakeSetPermission( Player player ) {
     Packet packet = new Packet( 2 );
     packet.data[0] = (byte)OutputCodes.SetPermission;
     packet.data[1] = player.GetOPPacketCode();
     return packet;
 }
Exemple #5
0
 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;
 }