RsFunction 1.0.1

More language for your server

  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
We welcome you on our site. This site is devoted to the Nukkit project and all that is connected with him. Here you can communicate, download plugins, also many other things get acquainted! Register the account right now :3
  1. zmdd
    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

Recent Reviews

  1. FlordYT
    FlordYT
    5/5,
    Version: 1.0.1
    Good idea