fCraft.CommandDescriptor.PrintUsage C# (CSharp) Method

PrintUsage() public method

Prints command usage syntax to the given player.
public PrintUsage ( [ player ) : void
player [
return void
        public void PrintUsage( [NotNull] Player player )
        {
            if ( player == null )
                throw new ArgumentNullException( "player" );
            if ( Usage != null ) {
                player.Message( "Usage: &H{0}", Usage );
            } else {
                player.Message( "Usage: &H/{0}", Name );
            }
        }

Usage Example

Ejemplo n.º 1
0
 static void ClearHandler(Player player, Command cmd)
 {
     if (cmd.HasNext)
     {
         CdClear.PrintUsage(player);
         return;
     }
     for (int i = 0; i < LinesToClear; i++)
     {
         player.Message("");
     }
 }
All Usage Examples Of fCraft.CommandDescriptor::PrintUsage