Announcement How to install/run a plugin

We've posted an important announcement regarding the current situation and the future of the game: Announcement

  • 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 game/server directory (if this folder does not exist, simply create it). Every plugin requires a separate subfolder, this subfolder contains the necessary plugin files (at least a ".jar" file*). Example:

    Source Code

    1. game/server directory
    2. |
    3. |____plugins
    4. | |____MyPlugin1
    5. | | |____myplugin.jar
    6. | |
    7. | |____MyPlugin2
    8. | | |____myplugin.jar
    9. | | |____someexamplefile
    10. | |
    Now if you start a server (or load a world in singleplayer), 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:

    Source Code

    1. name: MyPlugin
    2. path: C:/Projects/RW-MyPlugin/src
    3. 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).