Skip to content

About custom fields

AlonsoAliaga edited this page Feb 24, 2026 · 6 revisions

What are custom fields? 🤯

Custom fields is a new feature introduced in 2.4-BETA-PRO for the Premium version of AlonsoTags.

Important

Premium version is required to use custom fields feature.
You can purchase 💎 Premium version here.

What are they for? 🤔

These fields allows server owner to choose and extra data to display when a user selects a specific tag.
Custom fields available by default: prefix, suffix and extra.

Note

Default fields are available when plugin is installed.

How to register/add/remove custom fields? ✏️

In AlonsoTags/config.yml, modify the list in Options.Premium.Custom-fields path.
You can add as many as you want or remove the ones you don't use.
They must be lower case and can only contain letters, numbers and dashes.

Examples of allowed fields:
prefix
suffix
left-icon
right-icon
tag-icon
Examples of NOT allowed fields:
-icon(Cannot start with dash)
icon-(Cannot end with dash)
tag_icon(Cannot contain other than letters, numbers or dashes)
120(Cannot contain only numbers)\

Warning

To be able to use a specific custom field, it must be registered in config.yml file.
After modifying everything you need, run /alonsotags reload to load them.

How to start using custom fields? ✏️

This is an example of how a tag configuration currently looks like.

Tags:
  love-tag:
    Material: NAME_TAG
    Custom-model-data: 0
    Item-model: "none" #Requires "namespace:key"
    Dyeable: true
    Default-color: "&c"
    Hide-flags: true
    Tag: "{COLOR}[LOVE]"
    Displayname: "&7&l{COLOR}Love Tag"
    Recognition-title: "&f{COLOR}❤ I'm in love ❤"
    Permission: "none"
    Price: 0
    Cost:
      #Type? Available types: LEVEL,VAULT,TOKEN_MANAGER,PLAYER_POINTS,MATERIAL
      Type: "VAULT"
      #Material if type is MATERIAL?
      Material: "DIAMOND"
    Unbreakable: false
    Description:
    - "&7Tag for people in love."
    Lore:
      Locked:
      - "&7Tag for people in love."
      - "&7Preview: &f{TAG}"
      - "&7Recognition title:"
      - "&f{RECOGNITION-TITLE}"
      - "{DYEABLE}"
      - ""
      - "{RIGHT-CLICK-TO-PREVIEW-MESSAGE}"
      - "&cUnlocks automatically."
      Unlocked:
      - "&7Tag for people in love."
      - "&7Preview: &f{TAG}"
      - "&7Recognition title:"
      - "&f{RECOGNITION-TITLE}"
      - "{DYEABLE}"
      - " "
      - "{RIGHT-CLICK-TO-PREVIEW-MESSAGE}"
      - "&eClick to select."
      Selected:
      - "&7Tag for people in love."
      - "&7Preview: &f{TAG}"
      - "&7Recognition title:"
      - "&f{RECOGNITION-TITLE}"
      - "{DYEABLE}"
      - " "
      - "&aSelected."
    No-permission-message: "&cYou don't have permission to use this tag!"
    Not-enough-money-message: "&cYou don't have enough money to purchase this tag!"
    Purchase-commands: []
    Select-commands:
      Pre: []
      Post: []

For this example we will use the field tag-icon.

We proceed to register it in config.yml file.

Options:
  Premium:
    Custom-fields:
    - "tag-icon" #We add this line.
    - "prefix" #These are already registered, you can remove them if you don't need them.
    - "suffix"
    - "extra"

To use custom fields, we need to add an additional section.\

    #This section is under development and will might not work correctly.
    #Use it under your own risk. Report issues on https://alonsoaliaga.com/discord
    Custom-fields:
      tag-icon: #This is the identifier registered in config.yml file
        Value: "[❤️]" #Value to be displayed when using this field
        Parse: false #Should plugin parse this text using PlaceholderAPI?
        Formats: #These are the formats available: Chat, Tab and Score.
          Chat: "{VALUE}"
          Tab: "{VALUE} "
          Score: "{VALUE}"

The formats are an easy way to use a specific spacing for each display site.

Using these custom fields ⚔️

Now that you have your custom field registered in config.yml
and you added the custom field to the tag you want, it's time to use them!

To use them you can simply use placeholders from this list.

Important

Remember that each format has its own placeholder.

In this example we are using tag-icon field.
If you plan to use the Chat format you use: %alonsotags_custom_field_chat_tag-icon%
If you plan to use the Tab format you use: %alonsotags_custom_field_tab_tag-icon%
If you plan to use the Score format you use: %alonsotags_custom_field_score_tag-icon%

What happen if I didn't set custom fields for all my tags? 😥

Don't worry! By default the placeholders will display the pre defined value. (Empty by default)
You can take your time to update all your tags. (only if you want) 🫡

Clone this wiki locally