Using it

Rewards and the premium track

Rewards live in rewards.yml, one entry per level with a free and a premium reward. A reward is an icon, a name, optional lore and console commands (%player% is the player).

levels:
  1:
    free:
      icon: IRON_INGOT
      name: "<#FFF8E7>16 Iron Ingots"
      commands: ["give %player% iron_ingot 16"]
    premium:
      icon: GOLD_INGOT
      name: "<#A78BFA>32 Gold Ingots"
      commands: ["give %player% gold_ingot 32"]

The icon can be MATERIAL#custom-model-data. A level without a reward shows an empty slot in the menu.

Several rewards on one level#

Put every command in commands and list each reward as a lore line; one click gives them all. Set menu.reward-line to "" so the menu shows only your list:

levels:
  45:
    premium:
      icon: IRON_GOLEM_SPAWN_EGG
      name: "<#A78BFA>Level 45 Rewards"
      lore:
        - "<#9C7A1B>• <#A78BFA>1x Iron Robot"
        - "<#9C7A1B>• <#A78BFA>3x Treasury Crate"
      commands:
        - "robots give %player% IRON_ROBOT 1"
        - "ac sgive %player% Treasury 3"

The rewards menu#

  • Premium on top, the level track in the middle, free at the bottom, 9 levels per page.
  • Carts show the state: reward-ready (claimable, it glows), reward-locked and reward-claimed.
  • Claim all claims every unlocked reward. A claim is refused when the inventory is full.

Premium#

The premium track is the permission in premium-permission (mcbattlepass.premium). Sell it however you like. The Get the Premium Pass button runs menu.premium-shop-command from the console ({player} is the player); leave it empty and the button only shows text.

  premium-shop-command: "deluxemenus open creditshop_misc {player}"
Use the full command name

The command runs from the console, where another plugin may own the short name. Write deluxemenus, not dm.