Menu

Crates Configuration

This page explains how to configure and set up crates and their rewards in CCrates. Below is an example of a yaml file used for crate configuration.

Example Crate Configuration

# Example Crate Configuration
display-name: "&a&lExample Crate"  # The display name of the crate in-game, uses color codes.
opening: "COUNTDOWN"  # The animation type when opening the crate.

hologram:
  enable: true  # Enables or disables the hologram above the crate.
  height: 1.5  # The height at which the hologram will appear.
  update-interval: 10  # Time in seconds for how often the hologram updates.
  range: 10  # The range in which players can see the hologram.
  lines:  # The lines to be displayed in the hologram.
    - "%crate%"  # The name of the crate will be displayed here.
    - "&7Right Click to Open"  # Instruction for players to right-click to open the crate.
    - "&7Left Click for Preview"  # Instruction for players to left-click to preview the crate.

key:
  material: LIME_DYE  # The material used for the crate key.
  display-name: "&a&lExample Crate Key"  # The display name of the key.
  glow: true  # Whether the crate key should glow (true or false).
  lore:  # Lore for the crate key.
    - "&7Use this to open an Example Crate"  # Description of the key.

prizes:
  1:  # Prize 1, can be multiple prizes with numbers as identifiers.
    display-name: "&bDiamond Gear"  # Display name for the prize.
    chance: 50  # The chance (out of "max-chance") to get this prize.
    max-chance: 100  # The maximum chance for this prize (used for randomization).
    rarity: "COMMON"  # The rarity of the prize.
    firework:
      enable: true  # Enable fireworks when this prize is given.
      color: "255:0:0"  # Firework color in RGB format.
    guaranteed:
      value: true  # Whether this prize is guaranteed (it will be given once the conditions are met).
      crate-required: 20  # The required number of crates to be opened for this prize to be guaranteed.
    items:
      diamond_sword:  # The first item in the prize.
        material: DIAMOND_SWORD  # Material of the item.
        display-name: "&bExample Sword"  # Display name of the item.
        lore:
          - "&7This is an example"  # Lore for the item.
        enchantments:
          - "sharpness:1"  # Enchantment on the item.
      diamond_axe:  # The second item in the prize.
        material: DIAMOND_AXE  # Material of the item.
        display-name: "&bExample Axe"  # Display name of the item.
        lore:
          - "&7This is an example"  # Lore for the item.
        enchantments:
          - "sharpness:1"  # Enchantment on the item.
    commands:
      - "cc broadcast %prefix% &r&e%player% has opened %crate-name%"  # Command to broadcast when the prize is given.

  2:  # Prize 2.
    display-name: "&fLol Nothing"  # Display name for the prize.
    chance: 50  # The chance (out of "max-chance") for this prize.
    max-chance: 100  # The maximum chance for this prize.
    permission: "ccrates.prizes.nothing"  # Permission required to receive this prize.
    rarity: "UNCOMMON"  # The rarity of the prize.
    commands:
      - "cc broadcast %prefix% &r&e%player% has opened %crate-name%"  # Command for when this prize is given.
      - "cc broadcast %prefix% &r&e%player% &7found nothing in %crate-name%"  # Another command.
            

Rarity and Opening Animations

The rarity can be one of the following values: COMMON, UNCOMMON, RARE, EPIC, or LEGENDARY.

The opening animation can be one of the following: INSTANT, COUNTDOWN, CSGO, COSMIC, or SPIRAL. Each animation corresponds to a different opening style:

Editing rarities and openings

You can edit rarities' display names in the your selected messages file (default: messages/en.yml) and their chance modification in the config.yml.

You can edit some openings settings in their specific yaml file located in the "openings" folder within the plugin directory.

ItemCreator Library

Each prize item is created using the ItemCreator library, which allows for easy and customizable creation of items in your crates.

Adding Prizes via Command

You can also add prizes to crates via commands. For more details, visit the Commands page.