Loot Configuration
Definitions:
Loot container: A loot container is any container that can hold loot items. For example: loot chests or air supplies.
Loot item: It's just an item that can be configured. You can configure its name, amount, data, chance, lore, etc..
The loot configuration system works in a similar way to the arena system. Each .yml inside the folder "plugins/BattleRoyale/loot" is a different configuration. This way each battlefield can have a different loot configuration; but also different battlefields can use the same loot configuration. Note that if you don't specify which loot configuration a particular battlefield will use, a random loot configuration from the loot configurations folder will be used.
The plugin will create a loot configuration named "default.yml" the first time it is running. You can modify this file, or even create a new loot configuration by creating a copy of it.
There are three main sections in a loot configuration:
initial: The loot that players will receive at the start of the game.
chest: The loot to fill the loot chests around the battlefield.
air-supply: The loot to fill the air supplies.
You can put as many loot items as you want inside the previous sections.
Maximum
This value represents the maximum number of loot items that can be put into a loot container (loot chest, air supply, etc...) each 9 slots.
This can be confusing, but it is actually very simple. With this value you can control how many loot items can be found in a loot container. Minecraft inventories are divided in rows and columns:
There are 9 columns and 6 rows in the image above. So if you set the maximum to 2 then no more than 2 loot items will be set in each row:
How to setup a loot item
To create a loot item, simply create a new section within one of the main sections (initial, chest, or air-supply), then you must specify some values:
material
The material of the item. Not necessary if a plugin object is to be copied.
amount
The amount of the item.
data
The special data of item; you can use this value to get for example a Lapis Lazuli (from INK_SACK) in legacy versions (< 1.13).
chance
Chance/probability of spawning . A value between 0 and 100 is recommended, however you can enter a number even greater than 100.
plugin-object
The plugin object to copy. It can be a BattleRoyale object, or an object from another plugin that is supported (QualityArmory, CrackShotPlus, CrackShot, MMOItems, etc...).
BattleRoyale objects: This is the list of objects that the Battle Royale plugin introduces:
BRIDGE_EGG
LAUNCH_PAD
FIREBALL
TNT
ARENA_SELECTOR
LEAVE_ARENA
TEAM_SELECTOR
SETTINGS
MMOItems objects: MMOItems are set a little bit differently:
As MMOItems are organized by type, you must specify the type and the item in the following format: [type]:[id]. Example:
Examples:
BattleRoyale object:
QualityArmory object:
CrackShotPlus object:
MMOItems objects:
required
The loot items that are required to spawn along with this item.
There are two ways to set the required loot items (you can do pretty much the same with both):
List: A string list (like the lore) where each line (with the format: [loot item/plugin object]:[amount]) represents a required loot item. Example:
Section: A section where each sub-section represents a required loot item. Note that unlike the previous way (list), you are creating a new loot item; so, as you will notice, this way is useful when you need a completely personalized item. Example:
This is useful in cases where, for example, you need a bow to spawn with arrows or a certain weapon to spawn with its ammunition.
Last updated