For the complete documentation index, see llms.txt. This page is also available as Markdown.

Execution Chances

Individual chances

Each action line can be assigned a chance (0 - 100 represented as a percentage) at which the line will be executed. The chance is written directly after the action tag and followed by a colon.

Example

actions:
 - "[console] 20:give %player% obsidian 2" # 20%  chance
 - "[console] 60:give %player% coal 1"     # 60%  chance
 - "[console] give %player% apple 16"      # 100% chance (no value = always)

Individual chances are independent of each other — every line is rolled separately, so several of them (or none) can run in the same claim.

Group chances

Each action section can be separated by percentages, where each percentage represents the probability that the corresponding section will be executed. The percentages determine how likely it is for a particular block of actions to run. When these sections are defined, the system will randomly select exactly one of the sections based on their assigned probabilities.

The numbers are weights, so they work best when they add up to 100 — that way each one reads directly as a percentage.

Example

actions:
  80: # 80% chance for execution
    - '[console] give %player% diamond 1'
    - '[console] give %player% iron_ingot %exampleRandom%'
    - '[console] give %player% gold_ingot 3'
    - '[console] say %player% claimed his %type% reward!'
    - '[actionbar] &aSuccessfully claimed!'
    - '[title] &aClaimed'
    - '[subtitle] &aReward %type%'
  20: # 20% chance for execution
    - '[console] give %player% diamond 1'
    - '[console] give %player% iron_ingot %exampleRandom%'
    - '[console] give %player% gold_ingot 3'
    - '[console] say %player% claimed his %type% reward!'
    - '[actionbar] &aSuccessfully claimed!'
    - '[title] &aClaimed'
    - '[subtitle] &aReward %type%'
    - '[message] &a&lYou have been extra lucky today! Received 5 more diamonds!'
    - '[console] give %player% diamond 5'
    - '[console] 10:give %player% netherite_ingot 1' # Individual chances can be used aswell

Last updated