QuartzLib (formerly zLib) is a helper library for Bukkit plugins development, providing useful tools for small and big tasks, to fill the gaps of the Bukkit API.


You'll need approximately two minutes to integrate the QuartzLib inside your plugin, if you are using Maven already.

Currently, QuartzLib requires Java 8 or later, Bukkit 1.15 or later. This document explains how to install QuartzLib if you are using Maven, but it works too with other system, as long as a shading-like feature is present.  

Integration of the library files inside your plugin🔗

  1. Add our Maven repository to your pom.xml file.

  2. Add QuartzLib as a dependency. Be sure to use the latest version.

  3. Add the shading plugin to the build. Replace YOUR.OWN.PACKAGE with your own package.

  4. Build your project as usual, as example with the following command from your working directory, or using an integrated tool from your IDE.

    mvn clean install

Library & components auto-loading🔗

Currently, there is only one simple way to integrate this library. The QuartzLib provides his own version of the JavaPlugin main class, to semi-automatically load and unload the QuartzLib components and core.

  1. In your main class, replace extends JavaPlugin with extends QuartzPlugin (in fr.zcraft.quartzlib.core.QuartzPlugin).

    import fr.zcraft.quartzlib.core.QuartzPlugin;
    public class Toaster extends QuartzPlugin
        // ...
  2. Use inside onEnable() the loadComponents method to load the components you will use.

    public void onEnable()
        loadComponents(Gui.class, Commands.class, SidebarScoreboard.class);

The loadComponents method is the standard way to load the classes (components) used in your plugin. It's a generic tool to load QuartzLib components (GUIs, sidebars...), but also your owns. In QuartzLib components wiki pages, the component class to load through this method will always be given.

A note about overridden methods🔗

The QuartzLib overrides the onLoad method. If your plugin uses it you have to call super.onLoad() like this.

public void onLoad()

    // Your code, placed after.