Language system and placeholders - Rosstail/Nodewar GitHub Wiki
#config.yml
locale:
lang: <String> #only name file without extension.
Edit locale.lang
with the language you want: if your file in lang/ is named en_EN.yml
, put en_EN
inside.
You can add any language file inside the lang folder if Karma does not generate it by default. (You can even suggest me your lang file on Isues, pull request or discord)
Heres the structure of a lang file:
prefix: "&f[&cNW&f]&r "
format:
datetime: "yyyy-MM-dd HH:mm:ss"
datetime-never: "&7Never"
countdown: "{dd}d {HH}:{mm}:{ss}" #use dd, d, hh, h, mm, m, ss, s
storage:
type: "[prefix]Use [type] storage type."
webmap:
marker-set-label: "Territoires"
commands:
by-player-only: "[prefix]This command must be sent by a player."
permission-denied: "[prefix]You don't have permission for command [command_name] : [command_permission]."
insert-player-name: "[prefix]Insert player target name."
wrong-command: "[prefix]Wrong command."
wrong-value: "[prefix]Wrong value."
too-few-arguments: "[prefix]Too few arguments"
player-does-not-exist: "[prefix][player] does not exist or is disconnected."
player-no-data: "[prefix]No nodewar data for [player]."
player-not-in-team: "[prefix][player] is not in the team."
player-already-in-team: "[prefix][player] is already in the team."
help:
header: "&b====== &cNODEWAR HELP &b======"
line: "&a► &6/[syntax] &8: &r[desc]"
team:
desc: "Check, manage or create a team"
already-exist: "[prefix]Team already exist"
does-not-exist: "[prefix]Team does not exist"
part-of-no-team: "[prefix]You are part of no team"
team-full: "[prefix]This team is full !"
check:
desc: "Check team's data"
result:
- "[prefix][team_color_short]&r - [team_color_display]&r &8:&r"
- "* Color &8:&r {[team_color]}[team_color]&r"
- "* Your rank &8:&r [team_player_rank]"
- "* Members &8:&r [team_online_member]/[team_maximum_members] - [team_open]&r"
- "[team_result_member_line]"
- "* Relations &8:&r (default &8:&r [team_relation_default])"
- "[team_result_relation_line]"
result-other:
- "[prefix][team_display]&r &8:&r"
- "* Color &8:&r {[team_color]}[team_color]&r"
- "* Members &8:&r [team_online_member] - [team_open]&r"
- "[team_result_member_line]"
- "* Relations &8:&r (default &8:&r [team_relation_default])"
- "[team_result_relation_line]"
result-member-line: " - [team_player_connected][team_player] &8:&r [team_player_rank]"
result-relation-line: " - [team_display] &8:&r [team_relation]&r"
list:
desc: "Check the list of teams"
result-header: "[prefix]&bTeams list &8:"
result-line: "&a► [team_color_display]&r"
invites:
desc: "Manage teams invites."
check:
desc: "Check which teams want to recruit you."
result-header: "[prefix]&bInvites &8:"
result-line: "&a► [team_color_display]&r"
open:
desc: "Receive any team invitation"
result: "[prefix]You are now open to team invites"
close:
desc: "Refuse any team invitation"
result: "[prefix]You are now close to team invites"
create:
desc: "Create a nodewar team"
result: "[prefix]Team created"
too-short: "[prefix]Too short team name or short name [name]"
too-long: "[prefix]Too long team name or short name [name]"
already-exist: "[prefix]This team name or shortname already exists [name]"
not-enough-money: "[prefix]&cYou need [price] to create a team."
deploy:
desc: "Deploy yourself on one of your team territories"
result-territory: "[prefix]Teleport to territory."
result-region: "[prefix]Teleport to region."
result-failure-timer: "[prefix]Cannot deploy until [timer]"
result-failure-territory: "[prefix]You cannot deploy to this territory."
result-failure-region: "[prefix]You cannot deploy to this region."
cancelled: "[prefix]Deployment cancelled."
join:
desc: "Join an existing nodewar team"
result: "[prefix]Joined team"
result-uninvited: "[prefix]This team requires an invite"
manage:
desc: "Manage your team."
error-clearance: "You do not have enough clearance in your team."
result-confirm-name: "Insert the name of team to confirm."
color:
desc: "Edit your current team color"
result: "[prefix]Team color set to {[team_color]}[team_color]"
open:
desc: "Make your team joinable by anybody"
result: "[prefix]Your team is now open"
result-close: "[prefix]Your team is now close"
close:
desc: "Make your team joinable only on invites"
result: "[prefix]Your team is now close"
invite:
desc: "Invite a player into your team"
result: "[prefix]Invitation sent successfully."
result-already: "[prefix]Already sent an invite to this player."
result-ignore: "[prefix]This player ignore invitations."
member:
desc: "Manage players from your team"
cannot-target-self: "[prefix]You cannot target yourself !"
promote:
desc: "Promote a team member"
result: "[prefix]Player [player] promoted to [team_member_rank]."
error: "[prefix]You cannot promote this player."
demote:
desc: "Demote a team member"
result: "[prefix]Player [player] demoted to [team_member_rank]."
error: "[prefix]You cannot demote this player."
kick:
desc: "Kick a player from your team"
result: "[prefix]Player kicked successfully."
transfer:
desc: "Transfer ownership of team to player"
result: "[prefix]Ownership transferred successfully."
relation:
desc: "Manage relations with other teams"
accept:
desc: "Accept an incoming relation request"
none: "[prefix]No invites yet"
open:
desc: "Enable reception of relation invites"
result: "[prefix]Team open to relation invites"
close:
desc: "Disable reception of relation invites"
result: "[prefix]Team closed to relation invites"
request:
desc: "Set relation with selected team"
result-sent: "[prefix]Relation invite sent successfully."
result-effective: "[prefix]Relation set."
result-same-team: "[prefix]You can't target your own team."
result-unchanged: "[prefix]Same relation. No change."
result-already-sent: "[prefix]Already sent the invitation"
result-blocked: "[prefix]This team does not receive invites of relation improvements"
invites:
desc: "Check list of teams relations invites."
result-header: "[prefix]&bInvites &8:"
result-line: "&a► [team_line_direction]&r [team_color_display] &8: [team_relation] -> [team_relation_invite]&r"
result-line-received: "&e<<<"
result-line-sent: "&6>>>"
disband:
desc: "Disband your nodewar team"
result: "[prefix]Disbanded team"
leave:
desc: "Leave your current team"
result: "[prefix]Left team"
result-failure-owner: "[prefix]You cannot leave the team as the owner !"
admin:
desc: "Admin commands"
team:
desc: "Admin team command"
create:
desc: "Create a new team"
result: "[prefix]Succesfully created [team_color_display]."
edit:
desc: "Edit selected team"
color:
desc: "Edit selected team current team color"
result: "[prefix]Team color set to {[team_color]}[team_color]"
open:
desc: "Make selected team joinable by anybody"
result: "[prefix]Selected team is now open"
result-close: "[prefix]Selected team is now close"
close:
desc: "Make selected team joinable only on invites"
result: "[prefix]Selected team is now close"
invite:
desc: "Invite a player into selected team"
result: "[prefix]Invitation sent successfully."
result-already: "[prefix]Already sent an invite to this player."
result-ignore: "[prefix]This player ignore invitations."
member:
desc: "manage members of a team"
add:
desc: "Add a player to team"
result: "[prefix]Player [player] added to [team_display]."
remove:
desc: "Remove a player from team"
result: "[prefix]Player [player] removed from [team_display]."
promote:
desc: "Promote a team member"
result: "[prefix]Player [player] promoted to [team_member_rank]."
demote:
desc: "Demote a team member"
result: "[prefix]Player [player] demoted to [team_member_rank]."
kick:
desc: "Kick a player from selected team"
result: "[prefix]Player kicked successfully."
transfer:
desc: "Transfer ownership of team to player"
result: "[prefix]Ownership transferred successfully."
relation:
desc: "Manage relations with other teams"
open:
desc: "Enable reception of relation invites"
result: "[prefix]Team open to relation invites"
close:
desc: "Disable reception of relation invites"
result: "[prefix]Team closed to relation invites"
invites:
desc: "Check list of teams relations invites."
result-header: "[prefix]&bInvites &8:"
result-line: "&a► [team_line_direction]&r [team_color_display] &8: [team_relation] -> [team_relation_invite]&r"
result-line-received: "&e<<<"
result-line-sent: "&6>>>"
request:
desc: "Set relation with selected team"
result-invite: "[prefix]Relation invite sent successfully."
result-weight: "[prefix]Relation set."
result-ignore: "[prefix]Target team is not open to requests."
result-unchanged: "[prefix]Same relation. No change."
result-already: "[prefix]Already sent the invitation."
set:
desc: "Set immediate relation between selected teams"
result: "[prefix]Relation set."
result-unchanged: "[prefix]Same relation. No changes"
disband:
desc: "Disband selected nodewar team"
result: "[prefix]Disbanded team"
territory:
desc: "Edit the selected territory"
reload-regions:
desc: "Reload regions of a territory"
result: "[prefix]Regions of [territory_display] reloaded"
team:
desc: "Edit owner team of territory"
set:
desc: "Set owner team of territory"
result: "[prefix]Territory owner is now [team_display]"
reset:
desc: "Remove current owner of territory"
result: "[prefix]Territory is now neutral."
vulnerable:
desc: "Makes the territory vulnerable to player attacks"
result: "[prefix][territory_display] is now vulnerable"
protect:
desc: "Makes the territory immune to player attacks"
result: "[prefix][territory_display] is now immune"
territory:
desc: "Territory commands"
check:
desc: "Check status of a territory"
result:
- "[territory_description]"
- "[territory_objective_description]"
- "[territory_battle_description]"
result-not-on-territory: "You are not standing on a territory"
result-on-multiple-territory: "You are standing on multiple territories: please select one of them: [territories]"
player:
online: "&aONLINE"
offline: "&8OFFLINE"
team:
none-display: "None"
open: "&aOpen"
close: "&cClose"
rank:
owner: "&6Owner"
lieutenant: "&9Lieutenant"
captain: "&aCaptain"
member: "&dMember"
recruit: "&7Recruit"
relation:
neutral: "&fNeutral"
controlled: "&5Controlled"
team: "&bTeam"
ally: "&aAlly"
truce: "&dTruce"
enemy: "&cEnemy"
battlefield:
open: "OPEN"
closed: "CLOSED"
announcement:
open: "[prefix]The [battlefield_display] battlefield is now open !"
open-delay: "[prefix]The [battlefield_display] battlefield will open in [delay]"
close: "[prefix]The [battlefield_display] battlefield is now closed !"
close-delay: "[prefix]The [battlefield_display] battlefield will close in [delay]"
territory:
description:
- "&2[territory_id] &7- &6[territory_display]&r&d:"
- " &r&9Info&d:"
- " &c* &6World&d:&r [territory_world]"
- " &c* &6Type&d:&r [territory_type_display]"
- " &c* &6Protected&d:&r [territory_protected]"
- " &c* &6Line:&r [territory_desc_line]"
- " &c* &6Owner&d:&r {[territory_team_color]}[territory_team_display]"
objective:
types:
none:
display: "None"
description:
- " &9Objective&d: &7NONE&r"
control:
description:
- " &9Objective&d: &9CONTROL"
- " &c* &6Attackers ratio&d: &f[territory_objective_minimum_attacker_ratio_percent]%"
keep:
description:
- " &9Objective&d: &2KEEP"
- " &c* &6Minimum attackers&d: &f[territory_objective_minimum_attackers]"
- " &c* &6Attackers ratio&d: &f[territory_objective_minimum_attacker_ratio_percent]%"
koth:
display: "King of the Hill"
description:
- " &9Objective&d: &6KOTH"
- " &c* &6Capture points&d:"
- "[line_capturepoint]"
line-capturepoint: " &5- &r[territory_objective_capturepoint_[index]_display]&d: [territory_objective_capturepoint_[index]_team_color_display]"
siege:
display: "Siege"
description:
- " &9Objective&d: &cSIEGE"
- " &c* &6Capture points&d:"
- "[line_capturepoint]"
line-capturepoint: " &5- &r[territory_objective_capturepoint_[index]_display]&d: [territory_objective_capturepoint_[index]_team_color_display]"
battle:
types:
none:
description:
- " &9Current battle&d:"
- " &c* &6Status&d:&r [territory_battle_status]"
- " &c* &6Advantage&d:&r [territory_battle_advantage_color_display]"
- " &c* &6Time left&d:&r [territory_battle_time_left]"
- " &9Previous battle&d:"
- " &c* &6Winner&d:&r [territory_battle_winner_color_display]"
control:
description:
- " &9Current battle&d:"
- " &c* &6Status&d:&r [territory_battle_status]"
- " &c* &6Advantage&d:&r [territory_battle_advantage_color_display]"
- " &c* &6Health&d:&r [territory_battle_health] / [territory_objective_maximum_health]"
- " &c* &6Time left&d:&r [territory_battle_time_left]"
- " &9Previous battle&d:"
- " &c* &6Winner&d:&r [territory_battle_winner_color_display]"
keep:
description:
- " &9Current battle&d:"
- " &c* &6Status&d:&r [territory_battle_status]"
- " &c* &6Advantage&d:&r [territory_battle_advantage_color_display]"
- " &c* &6Time left&d:&r [territory_battle_time_left]"
- " &9Previous battle&d:"
- " &c* &6Winner&d:&r [territory_battle_winner_color_display]"
koth:
description:
- " &9Current battle&d:"
- " &c* &6Status&d:&r [territory_battle_status]"
- " &c* &6Advantage&d:&r [territory_battle_advantage_color_display]"
- " &c* &6High score&d:&r [territory_battle_time] / [territory_objective_time_to_reach]"
- " &c* &6Time left&d:&r [territory_battle_time_left]"
- " &9Previous battle&d:"
- " &c* &6Winner&d:&r [territory_battle_winner_color_display]"
siege:
description:
- " &9Current battle&d:"
- " &c* &6Status&d:&r [territory_battle_status]"
- " &c* &6Advantage&d:&r [territory_battle_advantage_color_display]"
- " &c* &6Health&d:&r [territory_battle_health] / [territory_objective_maximum_health]"
- " &c* &6Time left&d:&r [territory_battle_time_left]"
- " &9Previous battle&d:"
- " &c* &6Winner&d:&r [territory_battle_winner_color_display]"
status:
waiting: "&5Waiting"
ongoing: "&6Ongoing"
ending: "&7Ending"
ended: "&8Ended"
alert:
global:
defend:
start: "&4[territory_display] is under attack !" # server-wide
advantage: "&aYour team is repelling the enemies in [territory_display]" # territory-wide
disadvantage: "&cYour team is losing ground in [territory_display]." # territory-wide
victory: "&bYour team has defended [territory_display] successfully !" # server-wide
defeat: "&4You lose the [territory_display] territory..." # server-wide
attack:
start: "&eYour team engage a fight in [territory_display] !" # server-wide
advantage: "&aYour team is capturing [territory_display]" # territory-wide
disadvantage: "&cYour team is getting repelled at [territory_display]" # territory-wide
victory: "&bYour team has conquered [territory_display] !" # server-wide
defeat: "&4Your team has been repelled at [territory_display]..." # server-wide
bossbar:
global:
wild: "[territory_display] - [territory_battle_status]"
occupied: "[territory_display] - {[territory_team_color]}[territory_team_display] - [territory_battle_status]"
battle: "[territory_display] - {[territory_team_color]}[territory_team_display]&r {[territory_battle_advantage_color]}[territory_battle_direction]&r {[territory_battle_advantage_color]}[territory_battle_advantage_display]"
protected: "&aProtected"
vulnerable: "&cVulnerable"
Karma possesses a fallback system for the lang files. If your lang file is unknown or misconfigured, the default en_EN.yml file will be used instead.
In the case you use an edited/custom file missing some critical text entries, these critical lines will use the default en_EN.yml file to avoid errors. If the entries are empty and not critical, no message will be sent (report any error message. This is not normal).
You can use both types of colours in the plugin, Minecraft color codes and Hex colours:
- Minecraft Color codes Put the code before (or inside) the text you want
- Hex colors (1.16+): put
{#RRGGBB}
before or inside the text that you want. Help for HEX colors
Nodewar provides some custom placeholders that you can use both in karma itself or on any other plugin if you have PlaceHolderAPI on the server.
You can use both local placeholders and PAPI placeholders in Nodewar. blablabla
-
player
: Placed at the beginning of a command, the player will send it. if set before a [msg-*] placeholder, he will become the receiver of the message. -
[now]
: The actual timestamp of the server -
[msg]
: At the beginning of a command and following %player%, sends the message to the player in chat -
[msg-actionbar]
: At the beginning of a command and following %player%, sends the message to the player in the actionbar -
[msg-title]
: At the beginning of a command and following %player%, sends the message to the player as a title. -
[msg-subtitle]
: anywhere after a %msg-title% in the same line, everything after %msg-subtitle% will be sent in subtitle.
The duration of a title/subtitle is defined here, in ticks:
#config.yml
locale:
title:
fade-in: <int>
stay: <int>
fade-out: <int>
means the numerical identifier of the team
Replace team_<id>
by player_team
if you need to get the team of a defined player.
Local placeholder | PAPI placeholder | Description |
---|---|---|
[team_<id>_name] |
%nodewar_team_<id>_name% |
Shows team name identifier |
[team_<id>_display] |
%nodewar_team_<id>_display% |
Shows team display name without colour |
[team_<id>_color_display] |
%nodewar_team_<id>_color_display% |
Displays the team name in colored format |
[team_<id>_short] |
%nodewar_team_<id>_short% |
Shows the short team name |
[team_<id>_color_short] |
%nodewar_team_<id>_color_short% |
Displays the short team name in colored format |
[team_<id>_color] |
%nodewar_team_<id>_color% |
Shows team color as text |
[team_<id>_open] |
%nodewar_team_<id>_open% |
Displays formatted text of if the team is open to public |
[team_<id>_permanent] |
%nodewar_team_<id>_permanent% |
Displays formatted text of if the team is permanent |
[team_<id>_creation_date] |
%nodewar_team_<id>_creation_date% |
Displays formatted team creation date and time |
means the numerical identifier of the territory
territory_placeholder
can also be used without <id>_
on some occasions: i.e. territory own description.
Local placeholder | PAPI placeholder | Description |
---|---|---|
[territory_<id>_name] |
%nodewar_territory_<id>_name% |
Shows territory name identifier |
[territory_<id>_display] |
%nodewar_territory_<id>_display% |
Displays the territory name |
[territory_<id>_world] |
%nodewar_territory_<id>_world% |
Displays the world name of the territory |
[territory_<id>_type] |
%nodewar_territory_<id>_type% |
Shows the name/identifier of the type of territory |
[territory_<id>_type_display] |
%nodewar_territory_<id>_type_display% |
Displays the type display name of the territory |
[territory_<id>_description] |
%nodewar_territory_<id>_description% |
Displays territory description as depicted in the locale file |
[territory_<id>_desc_line] |
%nodewar_territory_<id>_desc_line% |
Displays the territory description as depicted in the territory/territory time config |
[territory_<id>_prefix] |
%nodewar_territory_<id>_prefix% |
Displays the prefix of territory |
[territory_<id>_suffix] |
%nodewar_territory_<id>_suffix% |
Displays the suffix of territory |
[territory_<id>_protected] |
%nodewar_territory_<id>_color% |
Displays if the territory is protected or vulnerable |
------- | ------- | ------- |
[territory_<id>_team_<team_placeholder>] |
%nodewar_territory_<id>_team_<team_placeholder>% |
Shows territory owner team info (See Teams placeholders) |
means the numerical identifier of the territory
territory_placeholder
can also be used without <id>_
on some occasions: i.e. territory own description.
Here are the common battle and objective placeholders. Check the territory objective page to check the specific placeholders of each objectives
Local placeholder | PAPI placeholder | Description |
---|---|---|
[territory_<id>_objective_name] |
%nodewar_territory_<id>_objective_name% |
Shows the objective type of territory |
[territory_<id>_objective_display] |
%nodewar_territory_<id>_objective_display% |
Displays the formatted objective name of territory |
[territory_<id>_objective_description] |
%nodewar_territory_<id>_objective_description% |
Displays the formatted objective description of the territory |
[territory_<id>_objective_<objective_placeholder>] |
%nodewar_territory_<id>_objective_<objective_placeholder>% |
Shows territory owner team info (Depends of the objective) |
------- | ------- | ------- |
[territory_<id>_battle_status] |
%nodewar_territory_<id>_battle_status% |
Shows the actual state of the current battle |
[territory_<id>_battle_direction] |
%nodewar_territory_<id>_battle_direction% |
Shows an arrow "====>" "<====" or "<---> depending of the current battle advantage |
[territory_<id>_battle_advantage_<team_placeholder>] |
%nodewar_territory_<id>_battle_advantage_<team_placeholder>% |
Shows the advantaged team info in the territory's current battle (See Teams placeholders) |
[territory_<id>_battle_winner_<team_placeholder>] |
%nodewar_territory_<id>_battle_winner_<team_placeholder>% |
Shows the winner team info in the territory's current battle (See Teams placeholders) |
[territory_<id>_battle_<battle_placeholder>] |
%nodewar_territory_<id>_battle_<battle_placeholder>% |
Shows territory owner current battle info (Depends of the objective) |