# Configuration

## Deafult config.yaml

{% code title="config.yaml" lineNumbers="true" fullWidth="false" %}

```yaml
#
#  ███████╗██████╗  ██████╗ ██╗    ██╗███████╗██████╗ ██████╗ ██╗      ██████╗  ██████╗██╗  ██╗███████╗
#  ██╔════╝██╔══██╗██╔═══██╗██║    ██║██╔════╝██╔══██╗██╔══██╗██║     ██╔═══██╗██╔════╝██║ ██╔╝██╔════╝
#  █████╗  ██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝██████╔╝██║     ██║   ██║██║     █████╔╝ ███████╗
#  ██╔══╝  ██╔═══╝ ██║   ██║██║███╗██║██╔══╝  ██╔══██╗██╔══██╗██║     ██║   ██║██║     ██╔═██╗ ╚════██║
#  ███████╗██║     ╚██████╔╝╚███╔███╔╝███████╗██║  ██║██████╔╝███████╗╚██████╔╝╚██████╗██║  ██╗███████║
#  ╚══════╝╚═╝      ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝╚══════╝
#
# "ANSI Shadow" from http://patorjk.com/software/taag/
# Version:    ${version}
# Build time: ${timestamp}
# Wiki: https://eproject.gitbook.io/emineblocks/
# --
# General configuration
# --

# Will the plugin be enabled? After change, restart needed!
enabled: true

# If set to true, the plugin will send message everytime the plugin is not updated
check-for-updates: true

# Default settings for all PowerBlocks, when they are created! Edit specified PB in their files itself!
default-powerblock:
  enabled: true

  # List of available materials: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html (We recommend using only solid blocks)
  # We are supporting Entities too! (You can spawn mobs instead of blocks)
  # List of available entities: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
  material:
    - STONE

  # This function will only work if you have more than 1 material in the list above
  # every-time: Every time you mine the block, the material will be changed to the next material in the list
  # destroy: The material will be changed to the next material in the list only when the block is fully destroyed
  # chance-x: every time you mine the block, there is a X% chance that the material will be changed to the next material in the list (X = 0-100)
  # Example: chance-50 = 50% chance that the material will be changed to the next material in the list
  material-swap: "every-time" # This function is working only if you have more than 1 material in the list above

  # Direction of the block (only for Directional blocks like stairs, chest, furnace, piston etc.)
  # You can find the direction of the block in the F3 menu (look at the block and look at the "facing" section)
  # Example: facing: north = material-direction: NORTH
  # If you want to swap the direction of the block, set material-direction-swap to true and the direction will be changed to the random direction every time the block is mined
  material-random-direction-swap: false

  # Permission required to mine the block
  # none = no permission required
  permission: "none"

  # Do you want to give rewards to players for mining this block when they are OFFLINE?
  offline-rewards: true

  # Enable saving player stats
  # If save-player-stats is enabled, you can use placeholders like alltime-wasted-time, alltime-breaks etc...
  save-player-stats: true

  # Location of the block
  location:
    world: world
    x: 0.0
    y: 0.0
    z: 0.0

  # Basic hologram (can be customized individually in the folder with concrete block)
  hologram:
    enabled: true
    offset: # You can offset the hologram from the original hologram position
      x: 0
      y: 0.2
      z: 0
    lines:
      - "Default MineBlock"
      - "%health%/%max-health%"
      - ""
      - "1. %placement_1% - %placement_1_breaks%"
      - "2. %placement_2% - %placement_2_breaks%"
      - "3. %placement_3% - %placement_3_breaks%"
      - ""
      - "You: %placement% - %placement_breaks%"

  # How many lives will the block have? (1x block mining = -1 health)
  health: 100-200

  # Increase or decrease the health of the block when it is mined
  health-type: DECREASE

  # These actions are called when the block is mined or when the player don't have permission to mine the block (to one or all players)
  actions:
    player:
      block-break:
        - "You have mined a block!"
      missing-permission:
        - "none"

    server:
      block-destroyed:
        - "The block has been destroyed!"

  # Basic cooldown settings
  cooldown:
    # Do you want every time a block reaches 0 life to be under cooldown?
    enabled: true
    # If a block is destroyed, what is the cooldown before the block is regenerated and can be mined again? (in seconds)
    time: 180
    # What material should the block be changed to in cooldown
    material: BEDROCK
    # Basic settings about hologram when it is under cooldown
    separate-hologram:
      # Do you want to use different hologram when the block is under cooldown?
      enabled: true
      offset: # You can offset the hologram from the original hologram position
        x: 0
        y: 0.2
        z: 0
      lines: # You can customize the hologram
        - "Default MineBlock"
        - ""
        - "Will be available in:"
        - "%cooldown_formatted%"
    # Do you want to broadcast a message to all players when the block is respawned? (edit message in messages.yaml)
    # If you want none message write "none"
    actions:
      server:
        respawn:
          - "The block has been regenerated!"

      player:
        failed:
          - "The block is under cooldown!"

  # Basic inactive feature settings
  inactive:
    # Do you want to reset/heal the block's health when it is not mined by anyone in some period of time?
    enabled: true
    # After what time the block should be reset/healed? (in seconds)
    time: 3600
    # RESET: The block will be healed to maximum health immediately
    # HEAL: X life will be added every X seconds
    type: HEAL

    # Basic action settings (more on our wiki)
    actions:
      server:
        start:
          - "The block has been marked as inactive!"

        # There can be used %player%
        failed:
         - "Someone managed to break the block before it was fully healed"

        done:
          - "The block has been fully healed!"

        period-heal:
          - "Block was healed for 3 hp!"

      player:
        failed:
          - "You broke the block before it was fully healed! Thanks for that!"

    # Under this section you can customize the healing process
    # How many lives should be added every X seconds? (only if type is set to HEAL)
    heal-amount: 1

    # How fast should the block be healed? (in seconds) (only if type is set to HEAL)
    heal-time: 3

    # What material should the block be changed to when it is inactive (only if type is set to HEAL)
    material: REDSTONE_BLOCK

    # Basic settings about hologram when it is inactive (only if type is set to HEAL)
    separate-hologram:
      # Do you want to use different hologram when the block is inactive? (only if type is set to HEAL)
      enabled: true
      offset: # You can offset the hologram from the original hologram position
        x: 0
        y: 0.2
        z: 0
      lines: # You can customize the hologram
        - "Block is healing!"
        - "%health%/%max_health%"
        - ""
        - "Quickly break the block!"
        - "Block is healing for %inactive_formatted%"

  # Default settings for rewards
  rewards:
    NewReward: # Name of reward (random name)
      # Do you want to use this reward?
      enabled: true
      # What should be the chance of getting this reward? (in percent) 100% = every time
      chance: 10

      # When should the reward be given?
      when: Placement 5

      # What should be the reward?
      rewards: # Every reward has its own settings (you can find them in the wiki)
        - "[CHAT] You got a reward!"
        - "[CONSOLE] give %player% diamond 1"

    reward-1:
      enabled: true # This reward will be used
      chance: 100 # Chance to get this reward is 100% (every time)
      permission: "mining.reward.1" # Permission required to get this reward
      when: Mined 20 # When the player mines 20+ blocks
      rewards: # I recommend creating items in-game. I doubt anyone could do it in the config anyway... xd
        - |
          item:
            ==: org.bukkit.inventory.ItemStack
            v: 3337
            type: DIAMOND
            amount: 2
            meta:
              ==: ItemMeta
              meta-type: UNSPECIFIC
              display-name: '{"extra":[{"text":"DIAMONDS!!"}],"text":""}'
              ItemFlags:
              - HIDE_ATTRIBUTES
        - "[CONSOLE] give %player% diamond 2"

  required-tools:
    # Do you want to use required tools?
    enabled: false

    # What tools should be required to mine the block?
    tools:
      firstTool:
        # tool field is required! You can write there * for all items!
        tool: "WOODEN_*"

        enchants: # With this enchantments:
          - "DIG_SPEED:3" # Efficiency 3+
          - "SILK_TOUCH" # every Silk touch

        name: # With this name:
          - "My Diamond Pickaxe"

      secondTool:
        tools:
          - "*_PICKAXE" # All pickaxes

        # If you want allow all enchantments write "none" or remove this section
        enchants:
          - "none"

        name:
          - "none"

    actions:
      player:
        wrong-tool:
          - "You used wrong tool to mine the block!"

  # Default settings for block particles
  particles:
  # Coming soon

  # Default settings for features
  features:
  # Coming soon

  # Default settings to our AFK system
  afk-system:
    # Do you want to use our AFK system?
    enabled: true
    # After what period of time should be the player marked as AFK? (in seconds)
    time: 120

    actions:
      player:
        afk:
          - "You are AFK!"
        afk-back:
          - "You are not AFK anymore!"

    # What do you want to do with the player when he is marked as AFK
    # MINE: we will block mining for him, but he will remain still in the same position
    # TELEPORT: we will teleport the player to configured location
    # KICK: we will kick the player from the server (kick-reason: <text>)
    # NONE: only broadcast message will be executed
    marked: # We show you only TELEPORT type, other types don't have LOCATION!
      type: TELEPORT
      warn-time: 10
      location:
        world: "world"
        x: 60
        y: 70
        z: 50
        yaw: 0
        pitch: 0
      kick-reason: "You were AFK for too long!"
    permission-to-ignore: "epowerblock.afk.bypass"
```

{% endcode %}

## Deafult messages.yaml

{% code title="messages.yaml" lineNumbers="true" %}

```yaml
#
#  ███████╗██████╗  ██████╗ ██╗    ██╗███████╗██████╗ ██████╗ ██╗      ██████╗  ██████╗██╗  ██╗███████╗
#  ██╔════╝██╔══██╗██╔═══██╗██║    ██║██╔════╝██╔══██╗██╔══██╗██║     ██╔═══██╗██╔════╝██║ ██╔╝██╔════╝
#  █████╗  ██████╔╝██║   ██║██║ █╗ ██║█████╗  ██████╔╝██████╔╝██║     ██║   ██║██║     █████╔╝ ███████╗
#  ██╔══╝  ██╔═══╝ ██║   ██║██║███╗██║██╔══╝  ██╔══██╗██╔══██╗██║     ██║   ██║██║     ██╔═██╗ ╚════██║
#  ███████╗██║     ╚██████╔╝╚███╔███╔╝███████╗██║  ██║██████╔╝███████╗╚██████╔╝╚██████╗██║  ██╗███████║
#  ╚══════╝╚═╝      ╚═════╝  ╚══╝╚══╝ ╚══════╝╚═╝  ╚═╝╚═════╝ ╚══════╝ ╚═════╝  ╚═════╝╚═╝  ╚═╝╚══════╝
#
# "ANSI Shadow" from http://patorjk.com/software/taag/
# --
# General messages
# You can use %prefix% to replace it for the currently prefix in config.yaml
# If you want to, you can use RGB colors (Gradients, Solid) -> more on our wiki
# Our systems supports PAPI
# --

# The main plugin prefix that will be displayed in front of every PowerBlocks plugin message
# You can use the normal minecraft color codes by using "&cPowerBlocks" or you can use our Hex color system (more information on wiki)
prefix: "<BOLD><GRADIENT:f44336:ff786e>PowerBlocks</BOLD></GRADIENT> &7»&r"

# output of %emineblocks_<mineblock>_
top:
  nobody: "&cNobody"
  nobodyValue: "0"

placeholder-error: "N/A"

units:
  second: "seconds"
  minute: "minutes"
  hour: "hours"

offline-reward:
  - "%prefix% You have receive offline reward for mining %block%"

command-missing-permission: "%prefix% &cYou don't have the permission to execute this command"

# Placeholder %time-to-afk%
# Write none to title if you don't want to send a title
afk-warn-title: "&4&lYou will be afk in %time-to-afk%s"
afk-warn-subtitle: "&7Move to cancel"

# Placeholder %afk-time%
# Write none to title if you don't want to send a title
afk-title: "&4&lAFK"
afk-subtitle: "&7You are AFK %afk-time%s"

# Placeholder %afk-time%
afk-back-title: "&a&lWelcome back!"
afk-back-subtitle: "&7You were AFK for %afk-time%s"

# More coming soon
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eproject.gitbook.io/epowerblocks/general/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
