<commit_before>package mtasa.server;

@:native("_G")
extern class MTA
{
  // Global vars
  public static var source: Element;

  // Global functions
  public static function addEventHandler(name: String, attachTo: Element, func: Dynamic): Bool;
  public static function removeEventHandler(name: String, attachTo: Element, func: Dynamic): Bool;

  public static function outputServerLog(message: String): Bool;
  public static function outputDebugString(message: String): Bool;

  public static function getRandomPlayer(): Player;
}<commit_msg>MTA class cleanup with new methods and documentation<commit_after>package mtasa.server;

@:native("_G")
extern class MTA
{
  // Global vars
  public static var source: Element;
  public static var root: Element;
  public static var resourceRoot: Element;

  /**
    Adds event handler to specific event and source element 
  **/
  public static function addEventHandler(name: String, attachTo: Element, func: Dynamic): Bool;

  /**
    Removes event handler for specific event and source element
  **/
  public static function removeEventHandler(name: String, attachTo: Element, func: Dynamic): Bool;

  /**
    Creates console with given name
  **/
  public static function addCommandHandler(commandName: String, handlerFunction: Player->String->Array<String>->Bool, ?restricted = false, ?caseSensitive = true)

  /**
    Outputs given message to server log
  **/
  public static function outputServerLog(message: String): Bool;

  /**
    Outputs given message to debug
  **/
  public static function outputDebugString(message: String): Bool;

  /**
    Outputs given message to ingame console 
  **/
  public static function outputConsole(message: String): Bool;

  /**
    Gets random player from server
  **/
  public static function getRandomPlayer(): Player;
}
{'fraction_non_alphanumeric': 0.09392265193370165, 'fraction_numerical': 0.0, 'mean_word_length': 4.3898809523809526, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6158201', 'n_tokens_mistral': 496, 'n_tokens_neox': 471, 'n_words': 181}