-
Notifications
You must be signed in to change notification settings - Fork 81
Configuration (v5)
Note: This wiki page is for the CratesPlus v5.0 snapshots!
CratesPlus has quite an extensive configuration file which allows you to customize many aspects of the plugin and it's behaviour. The overall structure is quite simple and admins/server owners should be able to learn it quite easily.
You can view an example configuration file here to also help you.
Below is a list of options which are in the config.yml and a explanation of what they do.
- Config Version Used to keep track of what version of CratesPlus your configuration is from. Because we want to try our best to maintain update support we store this to know when we need to update your config to work in newer versions.
- Metrics Whether or not the plugin should send data to the MC Stats website. These starts are used for information purposes so I know how many people are running the plugin and on which version.
- Update Checks Whether the plugin should check for updates or not.
- Update Branch Which "branch" the plugin should use for finding updates, either "spigot" for the latest stable releases or "snapshot" for the latest snapshot builds.
- Default Opener What should be the default opener when opening crates, find a list of openers here.
- Crate Protection Whether CratesPlus should protect crates being broken by non-admins.
- Disable Key Swapping Whether key dropping, putting in chests etc should be disabled. Currently dying with this option also loses the key completely.
- Default Hologram Text A list of lines which will be used by default for holograms above the crates.
Within the CratesPlus config.yml there should be a "Crates" section where you can add crates in the format below:
CrateName:
Type: KeyCrate
Knockback: 0.5
Broadcast: false
Firework: false
Color: GREEN
Block: ENDER_CHEST
Preview: true
Cooldown: 3
Hide Percentages: true
Permission: cratesplus.crate.cratename
Hologram Text:
- 'Hologram Line 1'
- 'Hologram Line 2'
Key:
Item: 'TRIPWIRE_HOOK
Name: '%type% Crate Key'
Enchanted: true
Winnings:
**WINNINGS GO HERE**
Below is a list of each option valid for all crate types and explanation of what they do.
- Type What crate type this crate should be, see Crate Types for a list of types and per type configuration.
- Broadcast Whether or not it should send a server wide broadcast when the crate is opened by a player.
- Firework Whether or not it should launch a random firework when the crate is opened by a player.
- Color Which color should be used for the crate name is certain places. Takes any valid ChatColor.
- Block Which block the crate should be when placed, this should be the material of the block and will depend on your version of CraftBukkit/Spigot.
- Permission Permission that is required for the player to open the crate, leave not set to require no permission.
Within each crate there is a winnings section, with this you can specify different rewards that can be won. See example:
CrateName:
...
Winnings:
'1':
Type: ITEM
Item Type: IRON_SWORD
Item Data: 0
Percentage: 25
Name '&6&lExample Sword'
Amount: 1
Enchantments:
- 'DAMAGE_ALL-3'
Lore:
- 'The greatest sword!'
'2':
Type: COMMAND
Item Type: MOB_SPAWNER
Percentage: 25
Commands:
- 'spawner give %name% spider'
Name: '&e&lSpider Spawner'
Item Data: 0
Amount: 1
Enchantments:
- 'DURABILITY-1'
Below is a list of each general option valid for a winning and explanation of what they do.
- Type Either "ITEM" or "COMMAND", depending if you want to give the player the item or have it run the specified commands.
- Item Type What material to use for the item, this will depend on your CraftBukkit/Spigot version.
- Item Data If you're using something such as wool you can use this option to set the data and thus changing it's color.
- Name Name to be shown on the item, can be set to "NONE" for the default item name.
- Percentage What percentage chance the player has to win this item, all percentages inside a crate must not add up to more than 100%. You can use a decimal if needed.
- Amount The amount of the item to give.
- Enchantments Enchantments to apply to the item.
- Lore Lore to apply to the item.
Using the "Type" option you can specify to have a "COMMAND" type. This means instead of giving the player whichever item is displayed it will run the commands entered into the config file. When using the "COMMAND" type make sure you have a list of commands to be ran, see example of the Spider Spawner above.