public class Localization
extends java.lang.Object
| Constructor and Description |
|---|
Localization(org.bukkit.plugin.Plugin plugin)
Creates a new Localization Object for the specified Plugin
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
getTranslation(java.lang.String key)
Returns the Strings referring to the specified Key
|
void |
reload()
Reloads the messages.yml File
|
void |
save()
Saves this Localization to its File
|
void |
sendTranslation(org.bukkit.command.CommandSender sender,
java.lang.String key,
boolean addPrefix,
Variable... variables)
Sends all Messages the key is referring to
including the Prefix and specified Variables
|
void |
setDefault(java.lang.String key,
java.lang.String... messages)
Sets the Default Message/s for the specified Key
|
void |
setPrefix(java.lang.String prefix)
Sets the default Message Prefix
|
public Localization(org.bukkit.plugin.Plugin plugin)
plugin - The Plugin this Localization is made forpublic void setDefault(java.lang.String key,
java.lang.String... messages)
key - The Key of those Messagesmessages - The Messages which this key will refer to by defaultpublic void setPrefix(java.lang.String prefix)
prefix - The Prefix by defaultpublic java.util.List<java.lang.String> getTranslation(java.lang.String key)
key - The Key of those Messagespublic void sendTranslation(org.bukkit.command.CommandSender sender,
java.lang.String key,
boolean addPrefix,
Variable... variables)
sender - The Player/Console who should receive these Messageskey - The Key of those MessagesaddPrefix - Specify whether the Prefix will get added or notvariables - All Variables which should be applied to the sent messagespublic void reload()
public void save()