API
Here you can find possible interfaces of the LanguageAPI to be able to use them in your plugin.
To include the LanguageAPI in your project, you can put the .jar file in the folder recources
of your project and make this entry in the pom.xml
under the dependencies:
Or for the BungeeCord version:
LanguageAPI
To see if the player is already registered in the database, you can check it with the following query.
To get the language of the player, you can query the following.
To set the player's language, do the following.
To change the language, you can simply do the following.
To add a language that you want your server network to support, you can do the following.
Of course, you can also remove a language that you have supported and no longer want to support. To do this, simply execute the following.
To see if the language is already supported, you can do the following.
To get all supported languages in one list, simply execute the following
To see if the default language is set, do the following.
To set the default language do the following.
To get the default language, perform the following.
To change the default language, do the following.
To see if the LanguageAPI is running in the multi-file system
, run the following.
To get a message from the file from the single-file system
, do the following.
To get a message from a file when multi-file system
is enabled, do the following. Pass the name of the file as fileName
.
Namefetcher
The Namefetcher is a "module" which stores the name and the corresponding UUID of the player.
To check if a player's entry already exists, do the following.
To check if a player's entry already exists, do the following.
To enter an entry in the Namefetcher for a player, do the following.
Make sure that there is only one entry per player, if possible.
To change a player's entry, for example if the player has changed his name, do the following.
To get the name of a player by UUID, do the following.
To get the UUID of a player by name, do the following.
Last updated