Skip to main content

Flag Messages

Flag messages

Flag messages (aka. flag alerts) are shown to players whenever an action related to a flag is prevented. E.g:

  • a player trying to break a block with the break-blocks flag being set to denied
  • a player trying to pickup items with the item-pickup flag being set to denied
  • a player trying to use a portal to the nether with the use-portal-players flag being set to denied
  • ...

Flag specific messages

{
"flag.msg.deny.use-items": "[%2$s] You can't use items here, §9%5$s§r — the §9%1$s§r flag prevents it in §a%3$s§r (dim §b%4$s§r).",
"flag.msg.deny.use-portal-players": "[%2$s] You can't use this portal — the §9%1$s§r flag forbids it in §a%3$s§r (dim §b%4$s§r).",
"flag.msg.deny.break-blocks": "[%2$s] You can't break §e%9$s§r here — the §9%1$s§r flag §cdenies§r that in §a%3$s§r (dim §b%4$s§r)."
}

Fallback flag messages

The default message is saved in the i18n keys and depends on the region type.

{
"flag.msg.deny.default": "[%3$s]: The §b%1$s§r flag §cdenies§r this action here!",
"flag.msg.deny.dim.default": "This action is §cdenied§r in this by the §b%1$s§r flag!",
"flag.msg.deny.global.default": "This action is globally §cdenied§r by the §b%1$s§r flag!",
"flag.msg.deny.local.default": "[%3$s]: The §b%1$s§r flag §cdenies§r this action in this area!"
}

When no explicit flag message is provided and the i18n keys are missing the default will be "[%3$s]: The §b%1$s§r flag §cdenies§r this action here!".

Flags have their own dedicated flag message which is shown when the flag is triggered. Further it's now possible to mute flag messages for each individual flag (disabling the alert of the region will still mute all flags for the region).

Placeholders

The following placeholders can be used in your flag messages or i18n keys to display customized flag messages to your players.

  • %1$s - flag name
  • %2$s - position of the flag action ( [X=x, Y=y, Z=z] )
  • %3$s - region name involved in the flag check
  • %4$s - dimension name
  • %5$s - player name involved, if applicable
  • %6$s - team name involved, if applicable
  • %7$s - the group name involved, if applicable
  • %8$s - entity name involved, if applicable
  • %9$s - block name involved, if applicable

Examples

{
"flag.msg.deny.use-items": "[%2$s] You can't use items here, §9%5$s§r — the §9%1$s§r flag prevents it in §a%3$s§r (dim §b%4$s§r).",
"flag.msg.deny.use-portal-players": "[%2$s] You can't use this portal — the §9%1$s§r flag forbids it in §a%3$s§r (dim §b%4$s§r).",
"flag.msg.deny.break-blocks": "[%2$s] You can't break §e%9$s§r here — the §9%1$s§r flag §cdenies§r that in §a%3$s§r (dim §b%4$s§r).",
"flag.msg.push.deny.dim.default": "This action is §cdenied§r in the entire dimension §b%4$s§r by the §9%1$s§r flag.",
"flag.msg.push.deny.global.default": "This action is §cglobally denied§r by the §9%1$s§r flag across all dimensions.",
"flag.msg.push.deny.local.default": "[%2$s] The §9%1$s§r flag stops you from doing that here in §a%3$s§r (dim §b%4$s§r)."
}

Text formatting

Flag messages also can be formatted by using the minecraft default string formatting.

  • For example &c %5$s &r tried to break a block in &9 %3$s &r! will result in a red player name and a blue region name.
  • Take a look at this tool for reference as well as the minecraft wiki.

There are default flag messages defined for each player related flag in the resource pack (internationalization) which can be customized.

There are also suggestion flag messages defined for the CLI in the resource pack which can be customized.


Interactive CLI

When managing the flags of regions you will most likely use the flag list command. This command will show you an interactive list of all flags of the region. You can then click on the flag name to get more information about the flag and to change the flag state.

flag-list