Skip to content
This repository was archived by the owner on Jul 4, 2022. It is now read-only.

Create_Own_Library_Extentions

Leonhard edited this page Sep 15, 2020 · 6 revisions

Create own libraries

Libraries located in the ./libraries folder and contains a library.json file will be loaded as SimplixApplication. Because of this, your applications will be able to require a specific library to be loaded before it starts up. SimplixLibraries are also capable of depending on each other.

Benefits

The advantage of making your library loadable as a SimplixLibrary is that it will be enabled to use the full benefits of the SimplixCore including its dependency injection capabilities without the library needing to be a plugin. This is a benefit since it is nasty to make a library that is loaded using the BungeeCord / Spigot platform-independent since you need to define a class that extends JavaPlugin/Plugin and has to contain an plugin.yml / bungee.yml. Also, the capabilities of libraries to depend on each other has some great new possibilities that come with it.

Creating own library

To create make your library loadable as a SimplixLibrary, you just have to create an library.json in your resources folder.

{
  "name": "Example",
  "version": "1.0",
  "authors": ["SimplixSoftworks"],
  "mainClass": "dev.simplix.example.Example"
}

Example: Cirrus

Clone this wiki locally