An event that fires before a modified chat message is formatted.

This is fired before the message is formatted, the formatted message is then passed to the andexdb_ModifiedChatMessageFormatFinalizationBeforeEvent event.

This is triggered by the chat ranks system of the add-on, if the chat ranks system is disabled this event will never fire.

Implements

Constructors

Properties

cancel: boolean

If set to true, the message will not be sent.

false
formatOptions: TagChatMessageFormat & {
    allowEval: boolean;
    dimension:
        | "overworld"
        | "nether"
        | "the_end"
        | "minecraft:overworld"
        | "minecraft:nether"
        | "minecraft:the_end";
    isPlaceholderPlayer?: boolean;
    player?: Player;
    playerPersonalSettings: {
        chatNameAndMessageSeparator?: string;
        chatRankPrefix?: string;
        defaultMessageFormatting?: string;
        defaultNameFormatting?: string;
        defaultSeparatorFormatting?: string;
        hideChatDisplayTimeStamp?: boolean;
        nameDisplayPrefix?: string;
        nameDisplaySuffix?: string;
        rankDisplayPrefix?: string;
        rankDisplaySeparator?: string;
        rankDisplaySuffix?: string;
    };
    ranks?: string[];
    tags?: string[];
    time?: number;
}

Type declaration

  • allowEval: boolean

    Whether to allow eval.

    true
    
  • dimension:
        | "overworld"
        | "nether"
        | "the_end"
        | "minecraft:overworld"
        | "minecraft:nether"
        | "minecraft:the_end"

    The type ID of the dimension that the player is in.

  • OptionalisPlaceholderPlayer?: boolean

    Whether the sender is a placeholder player.

  • Optionalplayer?: Player

    The sender.

  • playerPersonalSettings: {
        chatNameAndMessageSeparator?: string;
        chatRankPrefix?: string;
        defaultMessageFormatting?: string;
        defaultNameFormatting?: string;
        defaultSeparatorFormatting?: string;
        hideChatDisplayTimeStamp?: boolean;
        nameDisplayPrefix?: string;
        nameDisplaySuffix?: string;
        rankDisplayPrefix?: string;
        rankDisplaySeparator?: string;
        rankDisplaySuffix?: string;
    }

    The personal settings for the player.

    • OptionalchatNameAndMessageSeparator?: string

      The players default name and message separator.

      If specified it will be used instead of the global chat name and message separator.

    • OptionalchatRankPrefix?: string

      The players default chat rank prefix.

      If specified it will be used instead of the global chat rank prefix.

      undefined
      
    • OptionaldefaultMessageFormatting?: string

      The default message formatting for the player.

      This will be used if no other message formatting is found.

      undefined
      
    • OptionaldefaultNameFormatting?: string

      The default name formatting for the player.

      This will be used if no other message formatting is found.

      undefined
      
    • OptionaldefaultSeparatorFormatting?: string

      The default separator formatting for the player.

      This will be used if no other message formatting is found.

      undefined
      
    • OptionalhideChatDisplayTimeStamp?: boolean

      If set to true, the player's message time stamp will be hidden.

    • OptionalnameDisplayPrefix?: string

      The players default name display prefix.

      If specified it will be used instead of the global chat name display prefix.

      undefined
      
    • OptionalnameDisplaySuffix?: string

      The players default name display suffix.

      If specified it will be used instead of the global chat name display suffix.

      undefined
      
    • OptionalrankDisplayPrefix?: string

      The players default rank display prefix.

      If specified it will be used instead of the global chat rank display prefix.

      undefined
      
    • OptionalrankDisplaySeparator?: string

      The players default rank display separator.

      If specified it will be used instead of the global chat rank display separator.

      undefined
      
    • OptionalrankDisplaySuffix?: string

      The players default rank display suffix.

      If specified it will be used instead of the global chat rank display suffix.

      undefined
      
  • Optionalranks?: string[]

    The ranks that the player has.

  • Optionaltags?: string[]

    The tags that the player has.

  • Optionaltime?: number

    The time that the message was sent.

    This is used for the message time stamp.

The options for the formatting, see TagChatMessageFormat.

message: string

The message that will be formatted.

nameTag: {
    hidden: boolean;
    sourceType: "nameTag" | "name" | "hidden" | "sudo";
    value?: string;
}

Type declaration

  • hidden: boolean

    Whether the name tag is hidden.

  • sourceType: "nameTag" | "name" | "hidden" | "sudo"

    The type of the name tag.

    hidden - The name tag is hidden.

    sudo - The name tag is from the player's sudo tag.

    nameTag - The name tag is the player's name tag.

    name - The name tag is the player's name.

  • Optionalvalue?: string

    The player's evaluated name tag string.

The sender's evaluated name tag.

originalMessage: string

The original chat message.

sender: Player

Player that sent the chat message.

targets?: Player[]

Optional list of players that will receive this message. If defined, this message is directly targeted to one or more players (i.e., is not broadcast.)