Resource icon

RsFunction 1.0.1

No permission to download
It can help developers to better realize the multi language,
And it provides some events.
For example:
PlayerPlaceSignEvent
PlayerBreakSignEvent
PlayerTouchSignEvent

Command:
/language XXX
- Change Language



public class Lang implements Rs.Plugin.Function.Lang {
@Override
public File getfile() {
return new
File("plugins/XXXX/").getAbsoluteFile() ;
//"XXXX" is you plugin name
}
}



String lang = new Rs.Plugin.Function.LangSend(new Lang).getMsg("XXXX");
You need to put a file in the resource file, the file name: en.json
And the documents should be written.


{
"XXXX": "Your xxx"
}



If you export the “lang” variable
This will be: "Your xxx"

Then, if you add a zh.json to your resource folder
Write on it

{
"XXXX": "HHHHH"
}


And you enter the command /language zh(or your ip come from china
Will output "HHHHH"

my github: github.com/Rlxzmdd/RsPlugins
(English is not good, please do not mind
ToDo List
more Event
Author
zmdd
Downloads
42
Views
42
First release
Last update
Rating
5.00 star(s) 1 ratings

More resources from zmdd

Latest reviews

Good idea
Top