Contents
Instalação(top)
- Baixa o ficheiro JAR na página de download do plugin (apenas serás cobrado uma vez; as atualizações são grátis)
- Desliga o servidor (se estiver ligado)
- Envia/move o plugin para a pasta /plugins
- Liga o servidor
- Edita o config como preferires (localizado em /plugins/MultiLanguagePlugin/config.yml)
- Faz /mlp reload
- Edita os ficheiros de linguagem localizados em /plugins/MultiLanguagePlugin/languages
- Faz /mlp reload
- Edita as mensagens nos outros plugins para os placeholders definidos (ver em baixo) e dar reload a esses plugins.
- Aproveita o teu servidor multi linguagem
Placeholders(top)
Já falei de placeholders, por isso vou explicar o que são agora.Se quiseres usar o MLP com outros plugins (se estes não tiverem compatibilidade com o MLP), tens de usar placeholders para dizer ao MLP o que traduzir.
Isto é um placeholder simples:
Placeholders Avançados(top)
Placeholders avançados são mensagens dinâmicas. Imagina uma mensagem de morte: "Notch morreu."Temos the mudar "Notch" para o nome do jogador que morreu. É por isso que temos variáveis. No ficheiro de linguagem pode-se observar qualquer coisa parecida com
Ficheiros e Armazenamento(top)
MLP oferece dois tipos de armazenamento: YAML e SQL.You can easily switch between them using the config. Here is the default config.yml:
Podes facilmente alterar entre eles usando o config. Aqui está o config.yml predefinido:
Os comentários não serão traduzidos.
Code (YAML):
sql:
# Change to true if you want to use a database.
# You should have the credentials setup below.
enabled: false
# The URL of your database (normally it's localhost)
host: localhost
# The port of your database. The default sql port is 3306
port: 3306
# The database name
database: minecraft
# The username
username: root
# The password
password: ''
languages:
# The language name. This will influence the language file name.
# i.e. If the name is en_UK, the language file name will be located at languages/en_UK.language
# It's also not recommended to change this after someone join your server,
# as the name is saved with the player.
en_GB:
# This is the encoded flag code to show up the banner.
# To get a working code, you should visit http://www.needcoolshoes.com/banner and create your banner.
# When you finish, you should notice that the link as changed. Just copy the code generated by it.
# i.e. If the link is http://www.needcoolshoes.com/banner?=eapwplpnpmbzbj then the code will be eapwplpnpmbzbj
flag: eapwplpnpmbzbj
# The minecraft code is the minecraft language code. You can found a complete list here:
# http://minecraft.gamepedia.com/Language
minecraft-code: en_GB
# This display name. This will be the language name in non-code version. For example, en_UK should be English (UK)
# Feel free to use colors here! You shouldn't use per-language here, as item names aren't translated yet.
display-name: '&aEnglish (UK)'
pt_PT:
flag: bacLlt
minecraft-code: pt_PT
display-name: '&aPortuguese (Portugal)'
# The main language is the fallback language. If some message is not found, it will try to get it from here before
# returning an error message.
# Also, if you delete any language, the players with that language will have their language changed to this.
main-language: en_GB
# Do not change this if you don't know what you're doing.
language-creation:
syntax: lang
syntax-args: args
syntax-arg: arg
# Select what language checks are enabled. The API can't be disabled (yet).
enabled:
# Should the plugin check chat messages?
chat-messages: true
# Should the plugin check actions bars?
action-bars: true
# Should the plugin check titles?
titles: true
# Should the plugin check GUIs?
guis: true
# Should the plugin check scoreboards?
scoreboards: true
# Should the plugin check holograms (and/or entity display names)?
# Normally the most recent plugins use armor stants to make the holograms, but if they don't, you can change it here.
# Also, you can also translate other's entities name, like villagers. Add their entity type on the list below.
# Full list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
holograms:
- ARMOR_STAND
# Change to true if you want to use a database.
# You should have the credentials setup below.
enabled: false
# The URL of your database (normally it's localhost)
host: localhost
# The port of your database. The default sql port is 3306
port: 3306
# The database name
database: minecraft
# The username
username: root
# The password
password: ''
languages:
# The language name. This will influence the language file name.
# i.e. If the name is en_UK, the language file name will be located at languages/en_UK.language
# It's also not recommended to change this after someone join your server,
# as the name is saved with the player.
en_GB:
# This is the encoded flag code to show up the banner.
# To get a working code, you should visit http://www.needcoolshoes.com/banner and create your banner.
# When you finish, you should notice that the link as changed. Just copy the code generated by it.
# i.e. If the link is http://www.needcoolshoes.com/banner?=eapwplpnpmbzbj then the code will be eapwplpnpmbzbj
flag: eapwplpnpmbzbj
# The minecraft code is the minecraft language code. You can found a complete list here:
# http://minecraft.gamepedia.com/Language
minecraft-code: en_GB
# This display name. This will be the language name in non-code version. For example, en_UK should be English (UK)
# Feel free to use colors here! You shouldn't use per-language here, as item names aren't translated yet.
display-name: '&aEnglish (UK)'
pt_PT:
flag: bacLlt
minecraft-code: pt_PT
display-name: '&aPortuguese (Portugal)'
# The main language is the fallback language. If some message is not found, it will try to get it from here before
# returning an error message.
# Also, if you delete any language, the players with that language will have their language changed to this.
main-language: en_GB
# Do not change this if you don't know what you're doing.
language-creation:
syntax: lang
syntax-args: args
syntax-arg: arg
# Select what language checks are enabled. The API can't be disabled (yet).
enabled:
# Should the plugin check chat messages?
chat-messages: true
# Should the plugin check actions bars?
action-bars: true
# Should the plugin check titles?
titles: true
# Should the plugin check GUIs?
guis: true
# Should the plugin check scoreboards?
scoreboards: true
# Should the plugin check holograms (and/or entity display names)?
# Normally the most recent plugins use armor stants to make the holograms, but if they don't, you can change it here.
# Also, you can also translate other's entities name, like villagers. Add their entity type on the list below.
# Full list: https://hub.spigotmc.org/javadocs/spigot/org/bukkit/entity/EntityType.html
holograms:
- ARMOR_STAND
Every language has a .language file. This is the format of the file:
Todas as linguagens têm um ficheiro .language. Este é o formato do ficheiro:
Code (Text):
hello = Olá %1!
hello.others = %1 diz olá a %2!
help = Precisas de ajuda? Faz /help!
hello.others = %1 diz olá a %2!
help = Precisas de ajuda? Faz /help!
Comandos(top)
- /multilanguageplugin
- Aliases:
- /mlp
- /ml
- /multilanguage
- /language
- /lang
- Descrição: Comando principal do MultiLanguagePlugin. Se nenhum sub-comando for indicado, it will execute the openselector sub-comando
- Sub-Comandos:
- getflag
- Descrição: Obter a bandeira de uma linguagem
- Permissão: multilanguageplugin.getflag
- Uso: /<comando> getflag <linguagem>
- openselector
- Descrição: Abrir o menu de seleção de linguagens
- Permissão: multilanguageplugin.openselector
- Uso: /<comando> openselector
- reload
- Descrição: Recarrega o config
- Permission: multilanguageplugin.reload
- Uso: /<comando> reload
- help
- Descrição: Mostra o menu de ajuda
- Permissão: multilanguageplugin.help
- Uso: /<comando> help
- setlanguage
- Descrição: Definir a linguagem de um jogador
- Permissão: multilanguageplugin.setlanguage, multilanguageplugin.setlanguage.others
- Uso: /<comando> setlanguage [jogador] <linguagem>
- getflag
- Aliases:
Permissões(top)
- multilanguageplugin.getflag
- Predefinição: OP
- multilanguageplugin.setlanguage
- Predefinição: sim
- multilanguageplugin.setlanguage.others
- Predefinição: OP
- multilanguageplugin.openselector
- Predefinição: sim
- multilanguageplugin.reload
- Predefinição: OP
- multilanguageplugin.help
- Predefinição: sim
Bandeiras(top)
MultiLanguagePlugin permite que tenhas bandeiras a representar linguagens. Aqui está um tutorial passo-a-passo sobre isso:Visita http://www.needcoolshoes.com/banner
![[IMG]](//proxy.spigotmc.org/517b339cf43f88547e3379832a928db072271d0d?url=http%3A%2F%2Fi.imgur.com%2FE2w7eFs.png)
Personaliza a tua bandeira
![[IMG]](//proxy.spigotmc.org/16dc09004982e92129a8938c0d9eb424705ca1e6?url=http%3A%2F%2Fi.imgur.com%2FoyGF8NQ.png)
Encontra o código da bandeira no URL ou nas definições de partilha
![[IMG]](//proxy.spigotmc.org/b268966ec3a276a1977e293282854c95f1019491?url=http%3A%2F%2Fi.imgur.com%2FyuZRils.png)
![[IMG]](//proxy.spigotmc.org/b22503f3ad53d7107e0d206ee4183921e1a7a9af?url=http%3A%2F%2Fi.imgur.com%2FZDHWbBi.png)
Neste caso, o código da bandeira é eapwplpnpmbzbj
![[IMG]](http://proxy.spigotmc.org/517b339cf43f88547e3379832a928db072271d0d?url=http%3A%2F%2Fi.imgur.com%2FE2w7eFs.png)
Personaliza a tua bandeira
![[IMG]](http://proxy.spigotmc.org/16dc09004982e92129a8938c0d9eb424705ca1e6?url=http%3A%2F%2Fi.imgur.com%2FoyGF8NQ.png)
Encontra o código da bandeira no URL ou nas definições de partilha
![[IMG]](http://proxy.spigotmc.org/b268966ec3a276a1977e293282854c95f1019491?url=http%3A%2F%2Fi.imgur.com%2FyuZRils.png)
![[IMG]](http://proxy.spigotmc.org/b22503f3ad53d7107e0d206ee4183921e1a7a9af?url=http%3A%2F%2Fi.imgur.com%2FZDHWbBi.png)
Neste caso, o código da bandeira é eapwplpnpmbzbj