Language

Configuration

Introduction

The configuration file for this plugin is very simple, compared to other plugins. It uses .txt so you do not need to worry about using incorrect formatting, as you would with YML.

Guide

When you run the plugin for the first time, a default languages file will be generated. This file will contain language configuration for the English language. The language file is configured like so:

NODE : STRING

To set the LEVEL_GAINED node to "You have just leveled up.", you would do this:

LEVEL_GAINED : You have just leveled up.

The file does, however, allow for placeholders (you can see a list of nodes, their meaning and their placeholders under the "Nodes" section of this page). One of the placeholders for LEVEL_GAINED is %lvl%, which displays the player's new level. To set the LEVEL_GAINED node to "You have just reached level #.", you would do this:

LEVEL_GAINED : You have just reached level %lvl%.

The node must be separated from it's string (in the lang.txt file) with a space, a colon, and another space. Each string must be on a new line. Currently, every string must be used.

Nodes

  • LEVEL_GAINED - displayed when a player levels up and hits a new level for a bonus. %lvl% is the placeholder for the player's new level (1, 2, 5, 10, 90, etc) and %bns% is the placeholder for amount of hearts the player will do as a bonus (0.5, 1, 3, 10, etc).
  • LEVEL_LOST - displayed when a player loses a level and are now entitled to a different bonus. %lvl% is the placeholder for the player's new level (1, 2, 5, 10, 90, etc) and %bns% is the placeholder for amount of hearts the player will do as a bonus (0.5, 1, 3, 10, etc).
  • TOO_LOW - displayed when the player is below the minimum level for any bonus. %lvl% is the level required (1, 3, 10, 90, etc).
  • BONUS_ON - displayed when the player logs in with their bonus toggled on. No placeholders.
  • BONUS_OFF - displayed when the player logs in with their bonus toggled off. No placeholders.
  • BONUS_NOW_ON_DRAIN - displayed when the player toggles their bonus to on and XP draining is on. No placeholders.
  • BONUS_NOW_ON_NODRAIN - displayed when the player toggles their bonus to on and XP draining is off. No placeholders.
  • BONUS_NOW_OFF_DRAIN - displayed when the player toggles their bonus to off and XP draining is on. No placeholders.
  • BONUS_NOW_OFF_NODRAIN - displayed when the player toggles their bonus to off and XP draining is off. No placeholders.
  • NO_MORE_PERMISSION - displayed when a player logs in with their bonus toggled on, but their permission was removed inbetween their last log out and their current login session.
  • NO_PERMISSION - displayed when the player does not have the required permission to perform an action.

Notes

  • All nodes must have a string associated with them.

Comments

Posts Quoted:
Reply
Clear All Quotes