configuration/Main

Main Configuration "config.yml"

The configuration file "config.yml" is used to configure general properties and permissions. It uses the YAML-Format and can be found in plugins/LevelHearts/config.yml in your server root.

If your file cannot be read by the server, you properly have a syntax error in the file. Make sure you always use white-spaces instead of tabulators! For further help, post a comment with a link to a PasteBin with your configuration file and the error in the console (if existing).

Storage mode

Configure how LevelHearts will save the health and maximum health of your players. There are multiple options:

  • SQLite (default): All data will be saved in the data.db file.
  • MySQL: Connect to a MySQL database. This requires the URL of the database, username and password to be configured, but allows easy editing and external access to the data.
  • Physical: Do not store the data externally, but keep the players' health and maximum persistent, even when LevelHearts is turned off. This is not recommended as it will not reset the maximum health of the players when the plugin is uninstalled.
storage:
  mode: sqlite
  database: 'localhost:3306/database'
  table: 'Health'
  username: 'root'
  password: ''

Maximum health

maxHealth:
  levelMode: exp

The Level Mode determines which kind of levels players need to gain:

  • Exp (default): Use the Minecraft experience level system.
  • CombatLevel: Use the combat levels provided by the plugin McCombatLevel.
  • Disabled: All players' levels will be 0 and cannot change.

  default: 20
  limit: 60
  levelInterval: 5
  startLevel: 0

A player will start with default hearts (value in half-hearts, so 20 = 10 hearts), and every levelInterval levels, the maximum health will increase by one heart. The maximum value that can be reached is the limit (again in half-hearts). When startLevel is not zero, players will have to reach the startLevel to increase their max health every levelInterval levels.

To disable maximum health increase, set the levelInterval to 0.


  reset:
    levelChange: false
    login: false
    death: false

By default, once a player has increased his maximum health, it will never decrease again. You can configure LevelHearts to do that though. There are multiple options, when the maximum health should be recalculated according to the current level of the player:

  • Death: When a player died and respawns.
  • Login: When a player leaves the server and joins again.
  • LevelChange: Every time, a player looses levels (for example by enchanting or repairing).

  restoreHealth: true

With restoreHealth enabled, the health of a player will be replenished when his maximum health increases.


  particleEffect:
    increase: true
    decrease: true

You can display particle effects when a player's maximum health changes. Particles may not work on all server implementations.


Chat

chat:
  language: enUS
  changeMessagesEnabled: true
  commandMessagesEnabled: true

All messages from LevelHearts can be configured in lang.yml. There are a few languages available by default:

  • English (enUS)
  • German (deDE)
  • Korean (koKR)
  • Simplified Chinese (zhCN) - not completed
  • Russian (ruRU) - not completed
  • Portuguese (ptBR) - not completed

changeMessagesEnabled enables messages displayed when the maximum health of a player changes, commandMessagesEnabled enables update messages when the maximum health is changed using commands.


Commands

commands:
  maxHealthEnabled: true
  healthEnabled: true
  infoEnabled: true

It is possible to enable and disable the provided commands:

  • /maxhealth
  • /health
  • /armorweight

Permissions

Permission Documentation

Old format

Note: This only applies for the outdated version v0.1.0 and v0.1.1. Never version will automatically update the configuration to the new format

Configuration ValueDefaultDescriptionDefault permission
default_maxhealth20The default maxhealth a player has (in half hearts).-
maxhealth_increase_level_interval5The level interval a players maxhealth will need to gain one heart more.-
maximum_maxhealth60The maximum maxhealth a player can get (in half hearts).-
reset_maxhealth_on_loginfalseResets the players maxhealth when he logs in.lvlhearts.maxhealth.reset.login
reset_maxhealth_on_deathfalseResets the players maxhealth when he dies.lvlhearts.maxhealth.reset.death
restore_full_health_on_maxhealth_changetrueFully replenishes the players health when this maxhealth changeslvlhearts.maxhealth.restore
maxhealth_changeabletrueWhether the players maxhealth is changeable.lvlhearts.maxhealth.changeable
send_messagestrueWhether the plugin sends information messages on maxhealth change.lvlhearts.messages
change_maxhealth_on_level_changetrueWhether a players maxhealth will increase on level up.lvlhearts.maxhealth.levelchange

Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes