Skip to content

boosters

Booster items in boosters/ - multiplier, duration, permission, item and consume actions.

Each booster is one file, boosters/<id>.yml, and the file name is the booster id used by /afkzoneadmin booster give <player> <id> [amount]. Two ship by default: shard2x.yml and shard3x.yml. Players right-click the item (in either hand) to activate it. After editing, run /afkzoneadmin reload.

Settings:
Multiplier: 2.0
Duration: 3600
Permission: ""
Consume-On-Use: true
Item:
Material: AMETHYST_SHARD
Name: "&d&l2x Shard Booster"
Glow: true
Item-Flags: [HIDE_ATTRIBUTES]
Lore:
- "&7Multiplies the shards you earn"
- "&7in AFK zones while active."
- ""
- "&dInformation:"
- "&5 - &7Multiplier: &f{multiplier}x"
- "&5 - &7Duration: &f{duration}"
- ""
- "&e➥ Right-Click to activate!"
Consume-Actions:
- "[title] &d&lBOOSTER;&7{multiplier}x shards for {duration};10;40;10"

shard3x.yml is the same with Multiplier: 3.0, Duration: 1800 and AMETHYST_CLUSTER.

Required.

Key Default Description
Multiplier 2.0 Shard multiplier while active (2.0 = ×2).
Duration 3600 Seconds the booster lasts once activated. 0 makes it permanent.
Permission "" Node required to activate it. Empty means anyone. Without it the player gets NO-PERMISSION and keeps the item.
Consume-On-Use true Remove one item from the stack on activation. false makes the item reusable (once the active booster ends).

The countdown runs in real time from activation, including while the player is offline.

A standard item definition (Material, Name, Lore, Amount, Glow, Item-Flags, Base64, Custom-Model-Data, …, see item fields). The lore and name get two tokens:

Token Value
{multiplier} The Multiplier, for example 2.0.
{duration} The Duration, formatted (1h, 30m), or Permanent.

The item’s Name is also the booster’s name in messages ({booster}). Without a Name, the id with a capital first letter is used.

Booster items are tagged with their id, so renaming one in an anvil does not stop it working. If you delete a booster file, items already handed out stop doing anything.

Run when the booster is activated, after the BOOSTER-ACTIVATED message and before the BOOSTER-ACTIVATED sound. They use the shared action syntax and also get {booster}, {multiplier} and {duration}.

  • One booster at a time. While a booster is active, another cannot be redeemed (BOOSTER-ALREADY-ACTIVE) and the item is not consumed.
  • Highest multiplier wins, boosters never stack. If the player’s permission booster (optimalafkzone.booster.<n>) is equal to or stronger than the item, redeeming is refused with BOOSTER-WEAKER, so the item is never burned for nothing.
  • Boosters off means items do nothing. With Shards.Boosters.Enabled: false in config.yml, right-clicking a booster item is ignored.
  • /afkzoneadmin booster set <player> <multiplier> [duration] sets an active booster without an item and replaces any booster already active. /afkzoneadmin booster remove <player> clears it.

Check your own booster with /afkzone booster, or show it with %optimalafkzone_booster% and %optimalafkzone_booster_duration%.