Reward Variants

Alias Multi-Rank support

Permissions can be used to determine which reward variant will be claimed by the player.

Take, for example, a reward with the One Time Reward type. In this case, a player with the ultimaterewards.oneTimeRewardExample permission will have access to the given base reward option. If we want to offer more variants, we can define additional reward versions under the "variants" section.

Here’s an example configuration with multiple reward variants:

#
# Variants for this reward can be added here,
# if you don't want any, delete the variants section
#
# Which variant will be available for player depends on permission
# You can add as many variants you want
#
variants:
  premium:
    permission: ultimaterewards.oneTimeRewardExample.premium
    available-display-name: "&6&lPREMIUM WELCOME BONUS"
    available-lore:
      - ' '
      - '&7Contains:'
      - '&e ➪ 1x Iron Sword'
      - '&e ➪ 1x Iron Axe'
      - '&e ➪ 1x Iron Pickaxe'
      - '&e ➪ 1x Iron Shovel'
      - '&e ➪ 32x Apple'
      - '&e ➪ 1x Red Bed'
      - ' '
      - '&6► Click to claim premium version'
      - '&6   of the reward'
    actions:
      - '[console] give %player% iron_sword 1'
      - '[console] give %player% iron_axe 1'
      - '[console] give %player% iron_pickaxe 1'
      - '[console] give %player% iron_shovel 1'
      - '[console] give %player% apple 32'
      - '[console] give %player% red_bed 1'
      - '[message] &eWelcome to the server, %player%! I hope these items will assist you in getting started.'
  mythic:
    permission: ultimaterewards.oneTimeRewardExample.mythic
    available-display-name: "&5&lMYTHIC WELCOME BONUS"
    available-lore:
      - ' '
      - '&7Contains:'
      - '&d ➪ 1x Diamond Sword'
      - '&d ➪ 1x Diamond Axe'
      - '&d ➪ 1x Diamond Pickaxe'
      - '&d ➪ 1x Diamond Shovel'
      - '&d ➪ 64x Apple'
      - '&d ➪ 1x Red Bed'
      - ' '
      - '&5► Click to claim mythic version'
      - '&5   of the reward'
    actions:
      - '[console] give %player% diamond_sword 1'
      - '[console] give %player% diamond_axe 1'
      - '[console] give %player% diamond_pickaxe 1'
      - '[console] give %player% diamond_shovel 1'
      - '[console] give %player% apple 64'
      - '[console] give %player% red_bed 1'
      - '[message] &eWelcome to the server, %player%! I hope these items will assist you in getting started.'

In the menu configuration (guis.yml), you can specify a reward variant by appending a suffix :<variant> to the reward name. If no variant is specified, the system will automatically select the variant that the player is eligible for based on their permissions.

Here how it would look like in guis.yml

oneTimeRewards:
  title: "One Time Rewards Menu"
  rows: 4
  sound: BLOCK_NOTE_BLOCK_PLING
  content:
    11: exampleOneTimeReward  # Reward variant will be automatically determined based on the player's permissions
    13: exampleOneTimeReward:default # Reward variant will be set to default
    15: exampleOneTimeReward:mythic # Reward variant will be set to mythic
    31:
      item: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjZkOGVmZjRjNjczZTA2MzY5MDdlYTVjMGI1ZmY0ZjY0ZGMzNWM2YWFkOWI3OTdmMWRmNjYzMzUxYjRjMDgxNCJ9fX0=
      name: "&cBack"
      lore:
        "&7Return to the main menu"
      action: '[open] main'

Last updated