Mining levels
In MiningLevels, players level up by mining blocks to gain XP. The levels are defined in the config/levels.json
file and must be in sorted order. So from the first to the last level.
You should always use the ingame level editor to edit levels.
A level is defined as follows:
[
{
"name": "1",
"nextLevelXP": 100,
"ordinal": 0,
"instantBreakProbability": 0.0,
"extraOreProbability": 0.0,
"maxExtraOre": 0.0,
"hasteLevel": 0,
"commands": [
"say Congrats :)"
],
"rewards": [
{
"type": "DIAMOND",
"amount": 10
}
]
}
]
Persons who know json should understand this relatively easily. All others should always copy the inner object in the braces and adapt it.
The display name of each level.
The number of the level. Starting at zero. Means that level 1 is ordinal: 0.
XP needed to reach the next level.
The probability, a player at this level, will break a block instantly.
The probability, extra ores will drop, once a player breaks a block.
The maximum amount of dropped extra ores.
The level of haste effect a player gets, whenever he attempts to break a mining block.
This requires PlaceholderAPI to be installed!!!
(since 1.1.0)Commands that will be called, when the player levels up to this level.
(since 1.2.9)Commands can be called by the console with the prefix "console:" or by the player with the prefix "player:".
"commands": [
"console:op %ml_player_name%",
"player:say Hey guys I %ml_player_name reached %ml_level% in Mining!"
],
(since 1.1.0)rewards need to be structured like the following and separated by a comma. The minimum information provided about a reward is the type. The type has to be one out of this list.
{
"type": "DIAMOND",
"amount": 10
}
To add a new mining level, just add a new element as shown in the following.
[
{
"name": "1",
"nextLevelXP": 100,
"ordinal": 0,
"instantBreakProbability": 0.0,
"extraOreProbability": 0.0,
"maxExtraOre": 0.0,
"hasteLevel": 0,
"commands": [
"console:say wow, next level :)"
],
"rewards": [
{
"type": "DIAMOND",
"amount": 10
}
]
},
{
"name": "2",
"nextLevelXP": 300,
"ordinal": 1,
"instantBreakProbability": 5.0,
"extraOreProbability": 10.0,
"maxExtraOre": 0.0,
"hasteLevel": 0,
"commands": [],
"rewards": []
}
]
Each level needs to be separated by a comma. They must be sorted by ordinal!