Configuration - DavideBlade/Clash-of-Minecrafters GitHub Wiki

Configuration

The configuration is located in /plugins/CoM/config.yml. In this page are listed the sections of the configuration, with the information about each option.
If you want to see the full default configuration, click the spoiler below.

Default config.yml
############################################################
# +------------------------------------------------------+ #
# |                   GLOBAL SETTINGS                    | #
# +------------------------------------------------------+ #
############################################################
# Clash of Minecrafters' configuration file
# Spigot page: https://www.spigotmc.org/resources/clash-of-minecrafters.31180/
# For more information visit: https://github.com/DavideBlade/Clash-of-Minecrafters/wiki/Configuration

# Language of messages. Only "en" and "it" allowed.
Locale: en
# Set the spawn point. It will be used on player join and for other events (for example, at the end of a raid).
# Set "On join" to false to disable teleportation (only) when the player joins the server.
Default spawn:
  On join: true
  Location: world, 0.5, 72, 0.5
# Set the reward for killing the guardian of a village during a raid.
# Currency can only be "gems", "gold" or "elixir".
Raid rewards:
  Amount: 10
  Currency: gems
  Trophies won: 25
# Penalty received by a player who leaves or is killed by the village guardian during a raid.
# Currency can only be "gems", "gold" or "elixir".
Raid failure:
  Amount: 5
  Currency: gems
  Trophies lost: 15
# Seconds after which the raid ends
Raid timeout: 180
# How many players can stay in a clan?
Max players per clan: 15
# How many exp must receive the attacker's clan if raid has been successful?
Exp for raid: 2
# MySQL data
MySQL:
  Enabled: false
  Host: localhost
  Port: 3306
  Username: user
  Password: pass
  Database: CoM
# Set to false if plugin doesn't check for new updates.
Check for update: true
# Set the starting balance for new players. Set to 0 to not give that currency.
Starting balance:
  Gold: 45
  Elixir: 45
  Gems: 5
# Set the number of players that should be in the cache.
# The players that are expected to perform the most operations
# (e.g. the most active players on the server) will be cached.
Max player cache: 1500

############################################################
# +------------------------------------------------------+ #
# |                   VILLAGE SETTINGS                   | #
# +------------------------------------------------------+ #
############################################################
# Number of expansions (in all directions) for villages.
Max expansions: 8

############################################################
# +------------------------------------------------------+ #
# |                         MENU                         | #
# +------------------------------------------------------+ #
############################################################
# Row - is the number of menu rows - REQUIRED
# Title - menu title - REQUIRED
# Item - item material - REQUIRED
# Name - item's name - OPTIONAL
# Lore - lore of the item - OPTIONAL
# Durability - item's durability - OPTIONAL
# Enchantments - item enchantments - OPTIONAL
# Color - item color in RGB - OPTIONAL
# Skull - name of the head owner - OPTIONAL
# Pattern - banner pattern(s) - OPTIONAL
# Attributes - details of the item (e.g. enchantments) are to be displayed? - OPTIONAL
# Slot - is the slot number where item will be placed - REQUIRED
# Required balance - is the value the player must have in order to execute the command - OPTIONAL
# Required item - is the item that the player must have in order to execute the command - OPTIONAL
# Command - command executed by player (player: ) or by console (console: ) on item click. Use ';' for multiple commands - OPTIONAL
Menus:
  Main:
    Settings:
      Row: 1
      Title: '&8Shop'
    Items:
      Help:
        Item: leather_helmet
        Name: '&6List of commands'
        Enchantments:
          - unbreaking, 3
        Color: '255, 0, 0'
        Attributes: false
        Slot: 0
        Command: 'player: com help'
      Island:
        Item: bow
        Name: '&6Go to your island'
        Lore:
          - '&cRun the /island command:'
          - '&cif you do not have the island it will be created'
          - '&cotherwise you will only be teleported'
        Durability: 300
        Slot: 1
        Command: 'player: island'
      Balance:
        Item: player_head
        Name: '&6Check your balance'
        Skull: 'DavideBlade'
        Slot: 2
        Command: 'player: balance'
      Trophies:
          Item: black_banner
          Name: '&6Check your trophies'
          Pattern:
            - 'red, cbo'
            - 'yellow, cre'
          Slot: 3
          Command: 'player: trophies'
      Food:
        Item: blaze_rod
        Name: '&6Open food shop'
        Lore:
          - '&cShop where you can buy food with in-game currency'
        Slot: 7
        Command: 'player: open Food'
      Tools:
        Item: iron_pickaxe
        Name: '&6Open tools shop'
        Lore:
          - '&cShop where you can sell tools with in-game currency'
        Slot: 8
        Command: 'player: open Tools'

  Food:
    Settings:
      Row: 1
      Title: '&8Food shop'
    Items:
      Apple:
        Item: apple
        Lore:
          - '&cThis command/action will be executed only'
          - '&cif you have at least 100 gold'
          - ''
          - '&cIt gives you an apple'
        Slot: 3
        Required balance: '100, gold'
        Command: 'console: tell %player You bought an apple!; console: take 100 gold %player; console: give %player apple 1'
      Cake:
        Item: cake
        Lore:
          - '&cBuy a cake for 50 gems!'
        Slot: 5
        Required balance: '50, gems'
        Command: 'tell %player You bought a cake!; take 50 gems %player; give %player cake 1'

  Tools:
    Settings:
      Row: 1
      Title: '&8Tools shop'
    Items:
      Iron:
        Item: iron_sword
        Lore:
          - '&6Sell an iron sword for 15 gems!'
          - '&6&oThe sword will automatically be removed from your inventory.'
        Data: 0
        Slot: 4
        Required item: iron_sword
        Command: 'tell %player You sold an iron sword!; add 15 gems %player'

############################################################
# +------------------------------------------------------+ #
# |                       TOWN HALL                      | #
# +------------------------------------------------------+ #
############################################################
# If you want to disable town hall levels, delete this section.
# Price - is the price to buy the upgrade.
# Currency - is the currency of the price.
# Command - Command executed (by the console) when a player upgrades the town hall - OPTIONAL
# Guardian - Statistics of the guardian which defends the village under attack - OPTIONAL
# Health - Number of hearts (for comparison: one player has 10) - OPTIONAL
Town halls:
  1:
    Price: 4000
    Currency: elixir
    Guardian:
      Health: 15
  2:
    Price: 9000
    Currency: gold
    Command: 'say %player''s town hall has reached level 2!'
    Guardian:
      Health: 20
  3:
    Price: 16000
    Currency: elixir
    Command: 'say %player''s town hall has reached level 3!'
    Guardian:
      Health: 20
  4:
    Price: 25000
    Currency: gold
    Command: 'say %player''s town hall has reached level 4!'
    Guardian:
      Health: 20

############################################################
# +------------------------------------------------------+ #
# |                    GOLD EXTRACTOR                    | #
# +------------------------------------------------------+ #
############################################################
# If you want to disable gold extractors, delete this section.
# Production - is the hourly production of the extractor
# Price - is the price to buy the extractor.
# Currency - is the currency of the price.
# Capacity - is the maximum capacity of the extractor.
Gold extractors:
  1:
    Production: 12
    Price: 10
    Currency: gems
    Capacity: 576
  2:
    Production: 20
    Price: 30
    Currency: gems
    Capacity: 960
  3:
    Production: 43
    Price: 80
    Currency: gems
    Capacity: 2064
  4:
    Production: 60
    Price: 150
    Currency: gems
    Capacity: 2880
  5:
    Production: 100
    Price: 235
    Currency: gems
    Capacity: 4800
  6:
    Production: 202
    Price: 650
    Currency: gems
    Capacity: 9696
  7:
    Production: 300
    Price: 1000
    Currency: gems
    Capacity: 14400
  8:
    Production: 470
    Price: 2000
    Currency: gems
    Capacity: 22560
  9:
    Production: 750
    Price: 2650
    Currency: gems
    Capacity: 36000
  10:
    Production: 1000
    Price: 4000
    Currency: gems
    Capacity: 48000

############################################################
# +------------------------------------------------------+ #
# |                   ELIXIR EXTRACTOR                   | #
# +------------------------------------------------------+ #
############################################################
# If you want to disable elixir extractors, delete this section.
# Production - is the hourly production of the extractor
# Price - is the price to buy the extractor.
# Currency - is the currency of the price.
# Capacity - is the maximum capacity of the extractor.
Elixir extractors:
  1:
    Production: 12
    Price: 10
    Currency: gems
    Capacity: 576
  2:
    Production: 20
    Price: 30
    Currency: gems
    Capacity: 960
  3:
    Production: 43
    Price: 80
    Currency: gems
    Capacity: 2064
  4:
    Production: 60
    Price: 150
    Currency: gems
    Capacity: 2880
  5:
    Production: 100
    Price: 235
    Currency: gems
    Capacity: 4800
  6:
    Production: 202
    Price: 650
    Currency: gems
    Capacity: 9696
  7:
    Production: 300
    Price: 1000
    Currency: gems
    Capacity: 14400
  8:
    Production: 470
    Price: 2000
    Currency: gems
    Capacity: 22560
  9:
    Production: 750
    Price: 2650
    Currency: gems
    Capacity: 36000
  10:
    Production: 1000
    Price: 4000
    Currency: gems
    Capacity: 48000

############################################################
# +------------------------------------------------------+ #
# |                     ARCHER TOWER                     | #
# +------------------------------------------------------+ #
############################################################
# If you want to disable archer towers, delete this section.
# Damage - is the damage (in hearts) of the archer tower.
# Price - is the price to buy this archer tower.
# Currency - is the currency of the price.
Archer towers:
  1:
    Damage: 0.5
    Price: 20
    Currency: gems
  2:
    Damage: 1.2
    Price: 100
    Currency: gems
  3:
    Damage: 1.7
    Price: 230
    Currency: gems
  4:
    Damage: 2.1
    Price: 300
    Currency: gems
  5:
    Damage: 2.8
    Price: 510
    Currency: gems

############################################################
# +------------------------------------------------------+ #
# |                         CLAN                         | #
# +------------------------------------------------------+ #
############################################################
# If you want to disable clan levels, delete this section.
# Exp required - is the experience required for bring up the clan to next level.
# Command - Command executed (by the console) when a clan levels up - OPTIONAL
Clans:
  1:
    Exp required: 100
  2:
    Exp required: 350
  3:
    Exp required: 1000
  4:
    Exp required: 4800
  5:
    Exp required: 10000
    Command: 'say The clan "%clan" has reached level 5!'

Global settings

Locale → Language used for messages. Only the locale listed in the table above are accepted.

Locale Language
en English
it Italian

Depending on the language chosen, a file containing the translated messages will automatically be created. Changing locale does not cause the loss of any edited translation as each language has a separate file.
Example: you start the server with the English language and then change the message file. If you switch to the Italian language, the English message file (messages_en.yml) will remain untouched and the file messages_it.yml containing the already translated messages will be created.

Default spawn → Spawn where all players are teleported when they join the server (can be disabled) or when a raid ends. Format: <worlds name>, <x>, <y>, <z>.

Raid rewards → Rewards received by the player who destroys the attacked village. The list of currencies can be found here.
Every hour starts a war between clans that lasts 60 minutes. During this time, players with one clan can attack other players' villages (of players not belonging to the same clan) with the command /raid.
In the villages there will be a guardian who must be killed in order to get the rewards specified here.
Raid failure → Penalty received by the player who fails to destroy the attacked village. The list of currencies can be found here.
As opposed to the previous setting, here we specify what is to be subtracted from the player if he leaves the server or is killed by the attacking island guardian.

Raid timeout → Maximum raid time (in seconds)

Max players per clan → Specifies the maximum number of players a clan can contain.
If you decrease the maximum number of players that can be in a clan this will not be strictly retroactive. This means that if there is a clan with 100 players and the limit is decremented to 50, that clan will still contain those 100 players (who will not be removed); more will not be able to join and as some members leave they will not be able to rejoin (until the number goes below 50).

Exp for raid → Specifies how much exp the attacker's clan should receive if he succeeds in destroying the enemy village (=killing the guardian).
Exp is used to increase the level of the clan (see below).

MySQL → MySQL database data required to establish a connection.
Only player data can optionally be saved on file (YAML) or on a MySQL database (which, in case, must be enabled in this section). Other data will be saved on file regardless.

Check for update → Specifies whether or not the plugin should check if any new versions have been released.
On start-up, an attempt is made to contact the Spigot servers to check if there are any new versions. If there are, a notification is displayed in the console.
If this setting is set to false, this check will not be performed.

Starting balance → Balance that a player must have the first time he/she joins the server.

Max player cache → Number of players that should be in the cache.
The players that are expected to perform the most operations (e.g. the most active players on the server) will be cached. The larger this number is, the higher memory consumption will be as well as the faster the response speed of operations (e.g. searching for player data).


Villages

In this section you can change settings related to player villages.

Max expansions → Number of expansions (in all directions) for villages.
Each player owns a village, represented by an island (created with the command /island). Within the limits of the island the player can build whatever he wants and place buildings (extractors, defence towers...).
These limits are determined by the size of the island (how big the schematic is) and the number of expansions (16 blocks long).
If, for example, the island is 10x10 and the number of expansions is 10 (north, south, east and west), the player can build on a total area of 108900 blocks (square of side 10+((16*10)*2) blocks).
Note: maximum expansions are 120.
Island expansions diagram


Menus

Menus can be used as general menus, e.g. server navigation menus (items that teleport to the island, spawn...) or as shops for items. Naturally, you can use any other dedicated plugin of your choice (e.g., ChestCommands).

Settings

  • Row: number of menu lines, between 1 and 6 inclusive
  • Title: title of the menu (use & for colors)

Example of inventory with 3 rows and title "Inventory":
Inventory example

Item customization

You can build the item you prefer with the wide range of options available, explained below.

Item

The material type of the item. Names of materials in Spigot are different from those in Minecraft vanilla!
Materials lists for each version:

Name

The display name is the first line that appears in the tooltip when you hover over the item. You can use colors with the & character.

Display name

Lore

Additional rows appearing below the name in the tooltip. You can use colors with the & character.
Lore

Durability

Damageable items, such as tools, have a durability that decreases as you use them. For example, if you dig with a pickaxe, it will wear out and its 'life' will be reduced.
You can set the damage they must have received. In the example below, the damage is 1203 (1561-1203=358).

Sword with 358 of durability

Enchantments

Adds enchantments to the item, mainly used only for the glowing effect. Format: <enchantment>, <level>.
List of enchantments can be found here. Use the value in the name column.

Color

You can color the leather armor as you wish using the RGB model. Format: <red>, <green>, <blue> (each value must be between 0 and 255).
You can use this fantastic tool to create the colour you prefer and retrieve the RGB values.
Note: coloring is only applicable to leather armor! No other material will be affected.

Head

Sets the skull owner whose skin is to be displayed (the material must be player_head). The owners (with their skins) can be found here.

Skins are downloaded from both the server and the client: when creating menus (when executing the /open command) skins are downloaded from the server (in a method that does not freeze/delay the server and generally takes a fraction of a second). Once downloaded, the menu is shown to the player.
Subsequently, these skins must also be downloaded from the client for rendering. This operation takes a variable amount of time depending on the number of heads in the menu but generally takes less than 1 second and does not cause lag in the client (the player can click on a head even if it has not yet displayed the skin).

Skin textures are not downloaded every time but remain in the server cache for 60 minutes after the last use, after which they must be downloaded again. This means that if the same head (same owner!) is used several times it will remain in the cache reducing the time it takes for the menu to be displayed. The time that the client keeps downloaded skins in memory is not known, but a kind of cache is present anyway.

In brief:

  1. Command /open
  2. If the skins are already in the cache, go to step 3, otherwise the server downloads them by reaching the Mojang server (status: https://twitter.com/mojangstatus)
  3. The menu is shown to the player
  4. The client renders the skins: if it already has them in the cache, it shows them immediately, otherwise it downloads them and displays them.

Pattern

Specifies the list of patterns to be applied to the banner, in the order they are listed. Format: <color>, <pattern>.
The <color> is the dye color (list of dye colors) and <pattern> is the pattern code (list of pattern codes).

Attributes

Specifies whether item details (e.g. enchantments) are to be displayed. If set to false, the information will be hidden, otherwise displayed.

Slot

Number of the slot in which the created item is to be placed.
Naturally, the slot cannot exceed the size of the menu. So, for example, if you have an inventory of 1 line you cannot use a slot number greater than 8.

Slot numbering

Required balance

Balance required to execute commands (see below). Format: <amount>, <currency> (here the list of currencies).
On clicking the item, before executing the commands, the plugin checks that the player has the required amount: if the condition is satisfied the commands will be executed, otherwise not.
Note: no amount will be removed; if you want the player to pay a price, add the command /take in the command line.

Required item

Sets the item that the player must have (as a cost) in order to execute commands (see below).
On clicking the item, the plugin checks that the player has the item in his inventory: if the condition is met, the item is removed and the commands are executed, otherwise nothing is done.

Command

Specifies the commands executed when the item is clicked, if and only if all eventual conditions (Required balance and/or Required item) are satisfied.
If you want the command to be executed by the player, insert player: before the command. If you want the command to be executed by the console, put console: before the command. If no specification is given, the command is executed by the console by default.
Use ';' to separate more commands. Use the placeholder %player to get the name of the player.

Examples:

# The player runs the /trophies command (if they have permissions)
Command: 'player: trophies'
# The console executes the /tell command
Command: 'console: tell %player You bought an apple!'
# The console executes the /tell command
Command: 'tell %player You bought an apple!'
# The console executes the command /take and /give
Command: 'console: take 100 gold %player; console: give %player apple 1'

Town halls

In this section you can configure town hall levels.
If you want to disable town hall levels, delete this section. In case of misconfiguration (invalid or missing data), the loading of town halls will stop at the current level (if it is the first level, the building will be disabled). Read more here.

Price → Price to purchase the upgrade. Integers only (no decimals).
Currency → Currency of the price (here the list of currencies).
Command → Command to be executed by the console when the town hall levels up (can used for example to give extra permissions that unlock some features).
Health → Number of hearts of the island guardian.


Gold extractors

In this part you can define the statistics of each level of gold extractors.
If you want to disable gold extractors, delete this section. In case of misconfiguration (invalid or missing data), the loading of gold extractors will stop at the current level (if it is the first level, the building will be disabled). Read more here.

Production → This is the hourly production of the extractor. Only integers are allowed (no decimals).
Price → Price to purchase the extractor. Integers only (no decimals).
Currency → Currency of the price (here the list of currencies).
Capacity → Maximum capacity of the extractor. Integers only (no decimals).


Elixir extractors

In this part you can define the statistics of each level of elixir extractors.
If you want to disable elixir extractors, delete this section. In case of misconfiguration (invalid or missing data), the loading of elixir extractors will stop at the current level (if it is the first level, the building will be disabled). Read more here.

Production → This is the hourly production of the extractor. Only integers are allowed (no decimals).
Price → Price to purchase the extractor. Integers only (no decimals).
Currency → Currency of the price (here the list of currencies).
Capacity → Maximum capacity of the extractor. Integers only (no decimals).


Archer towers

In this part you can define the statistics of each level of the archer's towers.
If you want to disable archer towers, delete this section. In case of misconfiguration (invalid or missing data), the loading of archer towers will stop at the current level (if it is the first level, the building will be disabled). Read more here.

Damage → Damage (in hearts) of the archer's tower. Decimal numbers are allowed.
Price → Price to buy tower. Integers only (no decimals).
Currency → Currency of the price (here the list of currencies).


Clan

This part is responsible for defining the levels for clans and the exp needed to progress.
If you want to disable clan levels, delete this section. In case of misconfiguration (invalid or missing data), the loading of clans will stop at the current level. Read more here.

Exp required → Exp required to progress to the next level. Integers only (no decimals).
Command → Command to be executed by the console when the clan levels up (can used for example to give extra permissions that unlock some features)

⚠️ **GitHub.com Fallback** ⚠️