Reading of default language
Before we can make our own language file, we need to know. What is it ever?
Let's open English.yml in lang folder inside LazyChat-M.
yml
broadcast:
command:
usage: "<gold>Usage - /bc <message>"
messages:
new-broadcast: "<b><gold>New broadcast!</gold></b><newline><newline><m>"
broadcast-by: "<gold>Broadcast by <reset><prefix> <player> <suffix>"
mute:
command:
usage: "<gold>Usage - /lc-mute <mute/unmute> <player_name> <time_for_mute>(m/h/d)"
set_time: "You must set time - \"10 h\", \"1 m\" and by this way. h - hours, m - minutes, d - days."
unknown_format: "You trying to use unknown time format. You must use \"10 m\" - where m - minutes."
messages:
muted: "<red><player> has got muted for a <time> with reason <reason>"
yj_muted: "<red>You just muted for a <time>!"
you_muted: "<red>You muted!"
unmuted: "<green><player> just now been unmuted!"
yj_unmuted: "<green>You just now unmuted!</green>"
lazychat:
messages:
cannot_use: "<red>You <i>cannot</i> use this command!"
usage: "<gold>Usage - /lc <reload> or <info>."
info:
- "<color:#70c4ff>Lazy-Plugin \"LazyChat\"</color><newline>"
- "<color:#70c4ff>Author of plugin - LazyCato0o</color> (<click:open_url:'https://ru.namemc.com/profile/LazyCato0o.1'>NameMC</click>)<newline>"
- "<color:#70c4ff>Available on</color> <click:open_url:'https://github.com/LazyCat0/LazyChat-MC-plugin'><color:#e761ff>Github</color></click>, <click:open_url:'https://www.spigotmc.org/resources/lazychat.130059/'><color:#fff757>SpigotMC</color></click>.<newline>"
reload:
reloading: "<gold>Reloading..."
success: "<green>LazyChat has successfully reloaded!</green>"
error: "<red>LazyChat meet error(s) while reloading - <e_message>"
other:
ofp: "<red>Only for players <i>(or admins)</i>!"
CUNT_cause_DNHP: "<red>You cannot use some tags because you do not have enough rights!"
CSEM: "<red>You cannot send empty message!"
not-enough-rights: "<red>Not enough rights to send message to this chat!"
not-enough-rights-cmd: "<red>You do not have enough rights to use this command!"
cooldown: "<red>Please, wait <white><seconds><white> seconds before using it again!"
no-reason: "no reason"Here we see structure and how it ever created. So, we can analyze it. As example, we use lazychat section.
yml
lazychat:
messages:
cannot_use: "<red>You <i>cannot</i> use this command!"
usage: "<gold>Usage - /lc <reload> or <info>."
info:
- "<color:#70c4ff>Lazy-Plugin \"LazyChat\"</color><newline>"
- "<color:#70c4ff>Author of plugin - LazyCato0o</color> (<click:open_url:'https://ru.namemc.com/profile/LazyCato0o.1'>NameMC</click>)<newline>"
- "<color:#70c4ff>Available on</color> <click:open_url:'https://github.com/LazyCat0/LazyChat-MC-plugin'><color:#e761ff>Github</color></click>, <click:open_url:'https://www.spigotmc.org/resources/lazychat.130059/'><color:#fff757>SpigotMC</color></click>.<newline>"
reload:
reloading: "<gold>Reloading..."
success: "<green>LazyChat has successfully reloaded!</green>"
error: "<red>LazyChat meet error(s) while reloading - <e_message>"- LazyChat — root for
lazychatcommand texts.- messages — here we can see... messages? XD
- cannot_use — this is a message. In our case, it says about player cannot to use command. Also, here we see formatting.
<red>You <i>cannot</i> ....<red>makes text red, and<i>makes text italics, that "marks" about it was important.
- cannot_use — this is a message. In our case, it says about player cannot to use command. Also, here we see formatting.
- messages — here we can see... messages? XD
I think, you figured it out.
Same for every command, and it have own structure.
cannot_use to, as example, cant_use, plugin will be broken, and it send to you lazychat.messages.cannot_use. It's because it can't find path to text that needed for command.