How to install/run a plugin

  • How to install a plugin


    This is the default way to load a plugin.


    Usually all plugins belong into the plugins folder in your Rising World directory (if this folder does not exist, simply create it). If you're running the Steam version of the game, you can find the Rising World directory in "Steam/steamapps/common/RisingWorld". If you're running a multiplayer server (i.e. a dedicated Rising World server), find (or create) the "plugins" folder in your server directory accordingly.


    Every plugin requires a separate subfolder which contains the necessary plugin files (at least a ".jar" file and maybe some other optional files). Example:

    Code
    Rising World
    |
    |____plugins
    | |____MyPlugin1
    | | |____myplugin.jar
    | |
    | |____MyPlugin2
    | |____myplugin2.jar
    | |____someexamplefile

    Now if you load a world (or start a server), it should load all your plugins in the plugins folder.


    Information for developers: You can reload your plugins without having to restart the game or the server by typing "reloadplugins" (or "rp") into console (or send it as an input to the server), this unloads and reloads all plugins (i.e. the onDisable() and onEnable() methods will be called, in addition the "PlayerConnectEvent" and "PlayerSpawnEvent" will be triggered again for every player who is currently online). Please keep in mind that this is only intended for testing purposes!



    Optional: Compile a plugin by the game/server automatically
    Highly recommendable for developers


    It is possible that the game/server compiles your plugin "on the fly". This is an easy way to test your plugins without the need to compile it and move the files manually. All you have to do is to create an empty subfolder in the plugins folder (with the name of your plugin) and put a "projectinfo.txt" file there, this file contains a field name (the name of your plugin), path (the path to the "src" folder in your plugin project directory, or more precisely, the path to your source files) and optionally assets (the path to your assets [models, images etc], if you use any assets). Example:

    Code
    name: MyPlugin
    path: C:/Projects/RW-MyPlugin/src
    assets: C:/Projects/RW-MyPlugin/assets

    Additionally you have to set up the path to your JDK in the config.properties file, or server.properties when running a server ("plugins_jdk_path"). Keep in mind that you have to escape colons and backslashes, e.g. plugins_jdk_path=C\:\\\\Program Files\\Java\\jdk1.8.0_91


    Make sure there is no .jar file in your plugin subfolder, otherwise the .jar will be loaded instead.



    Optional: Load class files


    It is also possible to load separate class files instead. Again you just have to set up an empty subfolder in your plugins folder (with the name of your plugin) and move all your class files there. Now also put a "classinfo.txt" file there, which only requires the name of your plugin (e.g. name: MyPlugin).

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!