Text Syntax: Difference between revisions
(Created page with "Configuration syntax in Citizens is simple. Nodes within arrow brackets -- ''<>'' -- will be parsed and replaced if possible. Below are the available nodes that you can use. ==...") |
No edit summary |
||
(15 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
Configuration syntax in Citizens is simple. Nodes within arrow brackets -- | Configuration syntax in Citizens is simple. Nodes within arrow brackets -- <code><></code> -- will be parsed and replaced if possible. Below are the available nodes that you can use. | ||
==Chat Colors== | ==Chat Colors== | ||
Use the Chat Color | Use the Chat Color characters the same as any other plugin. For example, <code>&a</code> would give you green. | ||
'''Color Reference''' | '''Color Reference''' | ||
<0 | <br>0 -- BLACK | ||
<1 | <br>1 -- <span style="color:#0000AA">DARK BLUE</span> | ||
<2 | <br>2 -- <span style="color:#00AA00">DARK GREEN</span> | ||
<3 | <br>3 -- <span style="color:#00AAAA">CYAN</span> | ||
<4 | <br>4 -- <span style="color:#AA0000">DARK RED</span> | ||
<5 | <br>5 -- <span style="color:#AA00AA">PURPLE</span> | ||
<6 | <br>6 -- <span style="color:#FFAA00">GOLD</span> | ||
<7 | <br>7 -- LIGHT GRAY | ||
<8 | <br>8 -- GRAY | ||
<9 | <br>9 -- <span style="color:#5555FF">BLUE</span> | ||
<a | <br>a -- <span style="color:#55FF55">GREEN</span> | ||
<b | <br>b -- <span style="color:#22BBBB">AQUA</span> | ||
<c | <br>c -- <span style="color:#FF5555">ROSE RED</span> | ||
<d | <br>d -- <span style="color:#FF55FF">LIGHT PURPLE</span> | ||
<e | <br>e -- <span style="color:#AAAA11">YELLOW</span> | ||
<f> -- | <br>f -- WHITE | ||
'''Format Reference''' | |||
<br>k -- Obfuscated | |||
<br>l -- Bold | |||
<br>m -- Strikethrough | |||
<br>n -- Underline | |||
<br>o -- Italic | |||
<br>r -- Reset | |||
[https://www.digminecraft.com/lists/color_list_pc.php Alternate color/format reference page] | |||
You can also use hexadecimal colors in Minecraft 1.16+, using Spigot's syntax - <code>&x&f&f&0&0&e&e</code> or Essentials' syntax - <code>&#ff00ee</code> (both examples produce the same pink/magenta color). | |||
You can also use [https://docs.adventure.kyori.net/minimessage/format.html MiniMessage]. | |||
==Special== | |||
You can use <code><br></code> to create a newline in the middle of a text line. | |||
==Other== | ==Other== | ||
Line 26: | Line 44: | ||
===NPC Nodes=== | ===NPC Nodes=== | ||
<npc> - NPC's name | <code><npc></code> -- NPC's name | ||
<id> - NPC's ID | <br><code><id></code> -- NPC's ID | ||
<owner> - NPC's owner | <br><code><owner></code> -- NPC's owner | ||
===Player Nodes=== | ===Player Nodes=== | ||
<player> - Player's name | <br><code><player></code> -- Player's name | ||
<world> - Player's world | <br><code><world></code> -- Player's world | ||
<br><code><nearest_player></code> -- Name of the player closest to the NPC | |||
===Extra Nodes=== | |||
<br><code><random_player></code> -- Random online player name | |||
<br><code><random_npc></code> -- Random NPC name | |||
<br><code><random_npc_id></code> -- Random NPC ID | |||
==PlaceholderAPI== | |||
If you have [https://www.spigotmc.org/resources/placeholderapi.6245/ PlaceholderAPI] installed on your server, you can use PAPI placeholders on NPCs and use specific Citizens PAPI placeholders anywhere that supports PAPI. | |||
===External Placeholders on NPCs=== | |||
You can use any PAPI Placeholders the same as you would use them elsewhere in NPC text or commands, and non-player placeholders in NPC names/holograms/etc. [https://wiki.citizensnpcs.co/Frequently_Asked_Questions#My_PlaceholderAPI_Placeholder_Works_In_Chat.2C_But_Not_On_An_NPC See the FAQ for more details on the non-player limit]. | |||
===Citizens Placeholders=== | |||
<br><code>%citizens_selected_npc_name%</code> -- the name of the NPC selected by the player. | |||
<br><code>%citizens_selected_npc_id%</code> -- the ID of the NPC selected by the player. | |||
{{NavBox}} | |||
[[Category:Configuration]] |
Latest revision as of 00:45, 6 October 2022
Configuration syntax in Citizens is simple. Nodes within arrow brackets -- <>
-- will be parsed and replaced if possible. Below are the available nodes that you can use.
Chat Colors
Use the Chat Color characters the same as any other plugin. For example, &a
would give you green.
Color Reference
0 -- BLACK
1 -- DARK BLUE
2 -- DARK GREEN
3 -- CYAN
4 -- DARK RED
5 -- PURPLE
6 -- GOLD
7 -- LIGHT GRAY
8 -- GRAY
9 -- BLUE
a -- GREEN
b -- AQUA
c -- ROSE RED
d -- LIGHT PURPLE
e -- YELLOW
f -- WHITE
Format Reference
k -- Obfuscated
l -- Bold
m -- Strikethrough
n -- Underline
o -- Italic
r -- Reset
Alternate color/format reference page
You can also use hexadecimal colors in Minecraft 1.16+, using Spigot's syntax - &x&f&f&0&0&e&e
or Essentials' syntax - &#ff00ee
(both examples produce the same pink/magenta color).
You can also use MiniMessage.
Special
You can use <br>
to create a newline in the middle of a text line.
Other
There are also other nodes that you can use in configuration files. Some of these do not apply to certain configuration settings, so use with care. More will be added in the future as the need arises.
NPC Nodes
<npc>
-- NPC's name
<id>
-- NPC's ID
<owner>
-- NPC's owner
Player Nodes
<player>
-- Player's name
<world>
-- Player's world
<nearest_player>
-- Name of the player closest to the NPC
Extra Nodes
<random_player>
-- Random online player name
<random_npc>
-- Random NPC name
<random_npc_id>
-- Random NPC ID
PlaceholderAPI
If you have PlaceholderAPI installed on your server, you can use PAPI placeholders on NPCs and use specific Citizens PAPI placeholders anywhere that supports PAPI.
External Placeholders on NPCs
You can use any PAPI Placeholders the same as you would use them elsewhere in NPC text or commands, and non-player placeholders in NPC names/holograms/etc. See the FAQ for more details on the non-player limit.
Citizens Placeholders
%citizens_selected_npc_name%
-- the name of the NPC selected by the player.
%citizens_selected_npc_id%
-- the ID of the NPC selected by the player.
Quick Navigation | |
---|---|
Usage | Installation · Frequently Asked Questions · Commands · Editors · Characters · API · |
Configuration | Configuration · Text Syntax · Permissions · Waypoints · Data Storage |