本文整理汇总了C#中fCraft.Player.GetOPPacketCode方法的典型用法代码示例。如果您正苦于以下问题:C# Player.GetOPPacketCode方法的具体用法?C# Player.GetOPPacketCode怎么用?C# Player.GetOPPacketCode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fCraft.Player
的用法示例。
在下文中一共展示了Player.GetOPPacketCode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeSetPermission
internal static Packet MakeSetPermission( Player player ) {
Packet packet = new Packet( 2 );
packet.data[0] = (byte)OutputCodes.SetPermission;
packet.data[1] = player.GetOPPacketCode();
return packet;
}
示例2: MakeHandshake
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;
}
示例3: MakeHandshake
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;
}