Skip to content

Configuration

byteful edited this page Jun 28, 2022 · 1 revision

LevelTools has a pretty simple configuration where you can change the rewards, blacklist blocks/entities, and set XP values.

Please read the comments conveniently placed above each config key. They will explain and help you figure out what that config key does.

Default Configuration

#
# LevelTools v${version} by byteful#0001
#

# Useful Links:
# - https://minecraft.fandom.com/wiki/Attribute
# - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/attribute/Attribute.html
# - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Material.html
# - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/enchantments/Enchantment.html
# - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Sound.html
# - https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html

# Configuration for update checker.
update:
  # Should LevelTools check for updates on start?
  start: true
  # Should LevelTools check for updates periodically?
  periodically: true

# Configuration for messages.
messages:
  no_permission: "&cYou do not have permission to execute this command!"
  successful_reload: "&aSuccessfully reloaded LevelTools!"
  successfully_executed_action: "&aSuccessfully executed action for item in hand."
  item_not_tool: "&cThe item in hand is not supported by LevelTools!"
  successfully_reset_tools: "&aSuccessfully reset all tool XP/Levels for {player}."

# What action should be done when combining items in an anvil?
# Modes: "HIGHER_OF_BOTH" (Takes level and xp of higher level item), "LOWER_OF_BOTH" (Takes level and xp of lower level item), OR "ADD_BOTH" (Adds the level and XP of both items)
anvil_combine: "ADD_BOTH"

# The amount of XP needed to get from level 0 to level 1.
level_xp_start: 100.0

# The increase in amount of XP needed to get from level to level.
# Ex: If we are on level 1 and the level_xp_start is on 100.0 and the mode is ADD with 100.0, it would take 200.0 XP to get to level 2 from level 1.
# Ex 2: If we are on level 1 and the level_xp_start is on 100.0 and the mode is MULTIPLY with 2.0, it would take 200.0 XP to get to level 2 from level 1.
level_xp_increase:
  mode: "ADD" # Modes: "ADD" or "MULTIPLY"
  amount: 100.0

# Should blocks that are placed by a player count towards XP?
# May cause lag on a large server. Recommended to keep this true.
# If this is set to false, all blocks placed beforehand will be counted towards XP.
playerPlacedBlocks: true

# Configuration for the sound played during a level up.
level_up_sound:
  sound: "ENTITY_PLAYER_LEVELUP" # Set to null to disable this.
  pitch: 1.0
  volume: 1.0

# The default block XP modifier. Look at the configuration section below for a better explanation.
default_block_xp_modifier:
  min: 0.5
  max: 1.5

# The default combat XP modifier. Look at the configuration section below for a better explanation.
default_combat_xp_modifier:
  min: 1.0
  max: 2.5

# Configuration for specific block modifiers.
# These modifiers change the amount of XP a block gives. Set the min and max to the same value to disable the random range system.
block_xp_modifiers:
  DIAMOND_ORE:
    min: 5.0
    max: 10.0

# Configuration for specific entity (combat) modifiers.
# These modifiers change the amount of XP an entity gives. Set the min and max to the same value to disable the random range system.
combat_xp_modifiers:
  BLAZE:
    min: 5.0
    max: 7.5

# A blacklist that prevents the blocks listed from giving XP on break.
blockBlacklist:
  - "FIRE"
  - "SOUL_FIRE"
  - "CRIMSON_FUNGUS"
  - "BROWN_MUSHROOM"
  - "RED_MUSHROOM"
  - "CRIMSON_ROOTS"
  - "GRASS"
  - "TALL_GRASS"
  - "SEAGRASS"
  - "TORCH"
  - "FERN"
  - "LARGE_FERN"
  - "SUNFLOWER"
  - "CORNFLOWER"

# A blacklist that prevents the entities listed from giving XP on kill.
entityBlacklist:
  - "PLAYER"

# Configuration for tool rewards given at level ups.
# Handlers:
# - "command" : Runs the command provided as the console. (Ex: "command say test")
# - "player-command" : Runs the command provided as the player. ("Ex: player-command say test")
# - "enchant" : Adds an enchantment to the tool. Overrides existing enchantments with the new level provided. (Ex: "enchant efficiency 1")
# - "enchant2" : Does the same thing as "enchant" but doesn't override existing enchantments. (Ex: "enchant2 efficiency 1")
# - "attribute" : Modifies an attribute on the tool. (Ex: "attribute generic.attack_speed 10") OR (Ex: "attribute GENERIC_ATTACK_SPEED 10")
tool_rewards:
  1:
    - "enchant2 efficiency 1"

# Configuration for sword rewards given at level ups.
# Handlers:
# - "command" : Runs the command provided as the console. (Ex: "command say test")
# - "player-command" : Runs the command provided as the player. ("Ex: player-command say test")
# - "enchant" : Adds an enchantment to the tool. Overrides existing enchantments with the new level provided. (Ex: "enchant efficiency 1")
# - "enchant2" : Does the same thing as "enchant" but doesn't override existing enchantments. (Ex: "enchant2 efficiency 1")
# - "attribute" : Modifies an attribute on the tool. (Ex: "attribute generic.attack_speed 10") OR (Ex: "attribute GENERIC_ATTACK_SPEED 10")
sword_rewards:
  1:
    - "enchant2 sharpness 1"

# Configuration for bow and crossbow rewards given at level ups.
# Handlers:
# - "command" : Runs the command provided as the console. (Ex: "command say test")
# - "player-command" : Runs the command provided as the player. ("Ex: player-command say test")
# - "enchant" : Adds an enchantment to the tool. Overrides existing enchantments with the new level provided. (Ex: "enchant efficiency 1")
# - "enchant2" : Does the same thing as "enchant" but doesn't override existing enchantments. (Ex: "enchant2 efficiency 1")
# - "attribute" : Modifies an attribute on the tool. (Ex: "attribute generic.attack_speed 10") OR (Ex: "attribute GENERIC_ATTACK_SPEED 10")
bow_rewards:
  1:
    - "enchant2 power 1"

# Configuration for tool displays.
# To create a custom display for a specific tool item type, list that type as a key and set the lore as shown in the default lore.
# Placeholders:
# - {level} : The tool's level.
# - {xp} : The tool's xp.
# - {max_xp} : The tool's max XP needed to reach the next level.
# - {progress_bar} : The progress bar text built with the configuration under 'progress_bar'.
display:
  # Sends the progress bar to the action bar of a player when they gain XP on the tool in their hand.
  actionBar:
    enabled: true
    text: "{progress_bar} &e{xp}&6/&e{max_xp}"
  # Manage the lore displayed on the tool.
  lore:
    # Should LevelTools override the lore on tools?
    enabled: true
    # The lore lines that LevelTools overrides the tool with.
    lines:
      - ""
      - "&eLevel: &6{level}"
      - ""
      - "{progress_bar} &e{xp}&6/&e{max_xp}"

# Set to true if leveled items should show attributes. Recommended to keep this true to prevent "lore spam".
hide_attributes: true

# Configuration for the progress bar.
progress_bar:
  # The total amount of bars in the progress bar.
  total_bars: 50

  # The symbol used for the bar.
  bar_symbol: '|'

  # The symbol used to prefix the bar symbols.
  prefix_symbol: '['

  # The symbol used to suffix the bar symbols.
  suffix_symbol: ']'

  # The color for the prefix symbol.
  prefix_color: '8' # Do not include the '&'

  # The color for the suffix symbol.
  suffix_color: '8' # Do not include the '&'

  # The color for the achieved/completed bars.
  completed_color: 'e' # Do not include the '&'

  # The color for the remaining/placeholder bars.
  placeholder_color: '7' # Do not include the '&'
Clone this wiki locally